Q. What does the Python code: x = [1, 2, 3]; x[1] = 5 print(x) output?
Solution:
The code modifies the element at index 1 (second position) to 5, resulting in the list [1, 5, 3].
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.