Which method is used to add an element to the end of a list in Python?
-
A
append()
Correct answer
-
B
insert()
-
C
extend()
-
D
remove()
Correct answer
A. append()
18 views
Explanation
The append() method adds an element to the end of a list in Python.
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ