Python Programming - Data Types - Discussion

Discussion Forum : Data Types - General Questions (Q.No. 46)
46.
What will be the result of the following code snippet?
my_list = [1, 2, 3, 4, 5]
result = my_list.pop(2)
print(result)
2
3
4
[1, 2, 4, 5]
Answer: Option
Explanation:
The pop() method removes and returns the element at the specified index (2 in this case).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.