Informatics Practices

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

Python List Manipulation

2 Likes

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.

Answered By

2 Likes


Related Questions