Amongst which of the following is / are the method of list?

15. Amongst which of the following is / are the method of list?

  1. append()
  2. extend()
  3. insert()
  4. 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.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.