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?

  1. A.

    index ( )

  2. B.

    sort ( )

  3. C.

    pop ( )

  4. D.

    append ( )

Attempted by 120 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: Rssb Senior Computer Instructor