Vidyalelo
Python · Q20

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 20

Q20

In Python, how can you remove all occurrences of a specific element from a list?

A.
Use a loop and remove() method
Answer
B.
delete_all()
C.
clear()
D.
discard_all()

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board