Python Tutorial Python Advanced Python Resources Python Libraries
Python Java C++ C C# PHP R SQL DS Algo InterviewQ

Python - List append() Method



The Python list append() method is used to add an element to end of the list.

Syntax

list.append(elem)

Parameters

elem Required. value of the element which need to be added in the list.

Return Value

None.

Example:

In the example below, list append() method is used to add an element called 'SUN' to the end of the list called MyList.

MyList = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

MyList.append('SUN')   
print(MyList)

The output of the above code will be:

['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']

❮ Python List Methods

5