p = 'Love for Coding'
print(p[4], p[5])
Solution and Explanation:
This code prints the characters at positions 4 and 5 in the string p. In Python, string indexing starts at 0. Therefore:
p[4] refers to the fifth character in the string, which is the space (' ').
p[5] refers to the sixth character in the string, which is the letter 'f'.
So, when you run the code, it will output:
f
0 Comments:
Post a Comment