Which of the following methods removes the first occurrence of a specific value from a list in Python?
-
A
pop()
-
B
remove()
Correct answer
-
C
del()
-
D
clear()
Correct answer
B. remove()
13 views
Explanation
The remove() method removes the first occurrence of a specific value from a list.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ