CBSE Class 11 Computer Science Question 26 of 82

Lists in Python — Question 6

Back to all questions
6
Question

Question 6

What is the use of append() function in list?

  1. It adds an item to the end of the list.
  2. It adds an item at the beginning of the list.
  3. It adds an item anywhere in the list.
  4. All of these
Answer

It adds an item to the end of the list.

Reason — The append() function adds a single item to the end of the list. It does not create a new list, rather it modifies the original list.