Python Programming - Lists - Discussion

Discussion Forum : Lists - General Questions (Q.No. 73)
73.
What will the list.clear() method do?
Removes the last element from the list.
Removes all occurrences of a specific element.
Removes all elements from the list.
Clears the list, making it empty.
Answer: Option
Explanation:
The clear() method in Python lists is used to clear the list, making it empty.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.