Q. Write the most appropriate list method to perform the following tasks.


(a) Delete a given element from the list.

(b) Delete 3rd element from the list.

(c) Add an element in the end of the list.

(d) Add an element in the beginning of the list.

(e) Add elements of a list in the end of a list.


Answer :-

(a) remove()
(b) pop()
(c) append()
(d) insert()
(e) extend()

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post