Q. What will be the output of the following code?
Code:
x = [1, 2, 3] print(x[1])
β
Correct Answer: (B)
2
Explanation: Lists are zero-indexed, so `x[1]` returns the second element, which is `2`.