Python Programming - Lists - Discussion

Discussion Forum : Lists - General Questions (Q.No. 29)
29.
What will the list.remove(42) method do?
Removes the element at index 42.
Removes the element with the value 42.
Raises an error because index 42 does not exist.
Removes all occurrences of the value 42.
Answer: Option
Explanation:
The remove() method is used to remove the first occurrence of a specific value in the list.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.