1. Home
  2. Data Science
  3. Python
  4. What does del a[0] do on a list a in Python?

Added 25 Nov 2026

What does del a[0] do on a list a in Python?

  1. Deletes the whole list
  2. Removes the first element Correct answer
  3. Sets the first element to None
  4. Returns the first element

Correct answer

B. Removes the first element

MCQSEXAM

Explanation

del removes the item at the given index.

Reference

Asked in: Python Interview Lists

https://docs.python.org/3/tutorial/datastructures.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs