In Python language, which of the following method of lists is used to add an…

2024

In Python language, which of the following method of lists is used to add an element to the end of the list?

Answer: D. append ( )In Python, the `append()` method adds an element to the end of a list.

  1. A.

    index ( )

  2. B.

    sort ( )

  3. C.

    pop ( )

  4. D.

    append ( )

Attempted by 677 students.

Show answer & explanation

Correct answer: D

In Python, the `append()` method adds an element to the end of a list.

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…