Q. What is the output of the following code?
Code:
x = 'Python' print(x[0])
β
Correct Answer: (A)
P
Explanation: Strings in Python are indexed starting at 0, so x[0] gives 'P'.