Python List append() Method

Last Updated : 11 Apr 2026

Python list append() method adds an item to the end of the list. It appends an element by modifying the list. The method does not return itself. The item can also be a list or dictionary which makes a nested list.

Syntax of sort() Method

The following is the syntax of the list sort() method:

Parameter(s)

  • x:It can be a number, list, string, dictionary etc.

Return

  • It does not return any value rather modifies the list.

Examples of List append()

Let's see some examples of the append() method to understand it's functionality.

Example 1: Adding an Element to the List

First, let's see a simple example which appends elements to the list.

Example

Execute Now

Output:

Given List: [12, 16, 20, 24]
Updated List: [12, 16, 20, 24, 28]

Explanation:

Here, we are given a list consisting of some elements. We used the append() method to add a new element, 28, to the list. As a result, the element is added at the last of the list.

Example 2: Adding a list to a list

In Python, we can append a list to a list making it a nested list. Here is an example to understand how to do it using list append() method.

Example

Execute Now

Output:

List 1: [11, 15, 19]
List 2: [10, 20, 30]
Nested List: [11, 15, 19, [10, 20, 30]]

Explanation:

In the above example, we are given two lists consisting of some elements. We used the append() method to add the second list to the first list. This creates a nested list.

Example 3: Appending Multiple Lists to a Single List

Appending multiple lists to the single list will create a nested list. Here, two lists are appended to the same list and generates a list of the multiple lists. See the example below to understand about the nested list.

Example

Execute Now

Output:

List 1: [11, 15, 19]
List 2: [10, 20, 30]
Nested List: [11, 15, 19, [10, 20, 30, [15, 30, 45]]]

Explanation:

In this example, we are given multiple lists. We used the append() method to append the second list to the first list. We then again used the append() method to add a new list to the second list. As a result, the first list is also updated showing the nested list.