Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 1)
1.
What will be the output of the following code snippet?
numbers = [1, 2, 3, 4, 5]
numbers[1] = 9
print(numbers)
[1, 9, 3, 4, 5]
[1, 2, 3, 4, 5]
[9, 2, 3, 4, 5]
Error
Answer: Option
Explanation:
Lists in Python are mutable, so you can change the value of an element using indexing.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.