append() and extend() methods ??

Last updated:9/15/2020 9:01:28 PM

1 Answers

Prakash nidhi Verma
Prakash nidhi Verma

Differentiate between append() and extend() methods:

Both append() and extend() methods are the methods of list. These methods are used to add the elements at the end of the list. 

*) append(element) – adds the given element at the end of the list which has called this method. 

*) extend(another-list) – adds the elements of another-list at the end of the list which is called the extend method.

Answer