Home »
MCQs »
Python MCQs
Amongst which of the following is / are the method of list?
15. Amongst which of the following is / are the method of list?
- append()
- extend()
- insert()
- All of the mentioned above
Answer: D) All of the mentioned above
Explanation:
list.append(x), list.extend(iterable), list.insert(i, x) are the methods of list. list.append(x) - add an item to the end of the list. list.extend(iterable) - extend the list by appending all the items from the iterable. list.insert(i, x) Insert an item at a given position.