CBSE Class 12 Computer Science Question 8 of 44

Solved 2025 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 8

Back to all questions
8
Question

Question 8

What does the list.remove(x) method do in Python ?

  1. Removes the element at index x from the list
  2. Removes the first occurrence of value x from the list
  3. Removes all occurrences of value x from the list
  4. Removes the last occurrence of value x from the list
Answer

Removes the first occurrence of value x from the list.

Reason — The list.remove(x) method in Python searches for the first occurrence of the value x in the list and removes it. If the specified value is not found, it raises an Error.