Latest Code Tutorials

Python List append: How to Append Items in List

Python has a great built-in list type named “list.” List literals are written within square brackets [ ]. Lists work similarly to strings, use the len() function and square brackets [ ] to access data, with the first element at index 0. The append() method in Python appends an element or item to the end of the list. The list append() method 

Python List append()

The list append() is a built-in Python method that adds a single element to the existing list. The list.append() method takes an element as an argument and doesn’t return a new list; instead, it modifies the original list.


The append() method is the following.



The list append() method takes a single element and adds it to the end of the list. An element can be numbers, strings, another list, dictionary, etc.

Adding Element to a List in Python

Let us create a file called and add the following code inside it.


GoT = ['Daenerys', 'Jon', 'Tyrion']
Friends = 'Rachel'


Save the file and go to the cmd or terminal and run the file using the following command.


Python List append() Method Example | Python Standard Libary

Adding List to a List in Python

Now, write the following code inside the file.

GoT = ['Daenerys', 'Jon', 'Tyrion']
Friends = ['Rachel', 'Monica', 'Phoebe']


In the above example, we are adding a list to the list. So the second list considers as a single list item and it appends as a separate item. The output is the following.

Adding List to a List in Python

Again, it does not return a new list, modifies the original.

Finally, Python List append() Example is over.

Leave A Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.