Last modified: May 23, 2026
Python Append List to List: A Complete Guide
Working with lists is a core part of Python programming. One common task is combining lists. You might need to add one list to the end of another. This is often called "appending a list to a list."
Python offers several ways to do this. Each method has a different effect. Choosing the right one depends on your goal. Do you want to add the list as a single element? Or do you want to merge its items into the original list?
This guide explains all the methods. You will learn append(), extend(), and list slicing. We'll also cover performance and common mistakes. By the end, you'll know exactly how to append lists in Python.
Using the append() Method
The append() method adds a single item to the end of a list. When you pass a list to append(), it adds the entire list as one element. This creates a nested list.
This is useful when you want to keep the sublist intact. For example, you might want a list of lists. Each sublist represents a group of items.
# Using append() to add a list as a single element
main_list = [1, 2, 3]
new_list = [4, 5, 6]
main_list.append(new_list)
print(main_list)
[1, 2, 3, [4, 5, 6]]
Notice the output. The original list now has four elements. The fourth element is the entire new_list. This is a nested structure.
Remember:append() modifies the list in place. It does not return a new list. The method returns None.
Using the extend() Method
The extend() method is different. It adds each element of an iterable to the end of the list. When you pass a list to extend(), it adds the individual items.
This is the most common way to append the contents of one list to another. It flattens the new list into the original.
# Using extend() to add individual elements from a list
main_list = [1, 2, 3]
new_list = [4, 5, 6]
main_list.extend(new_list)
print(main_list)
[1, 2, 3, 4, 5, 6]
The result is a single flat list. All items from new_list are now part of main_list. This is perfect for merging lists.
Important:extend() also modifies the list in place. It works with any iterable, not just lists. You can extend with tuples, sets, or strings.
For a deeper look at this method, check out our guide on Python List Extend: A Complete Guide.
Using the + Operator
The + operator creates a new list. It combines two or more lists into one. Unlike append() and extend(), it does not modify the original lists.
This is useful when you want to keep the original lists unchanged. You create a new list with the combined data.
# Using + operator to create a new combined list
list_a = [1, 2, 3]
list_b = [4, 5, 6]
combined = list_a + list_b
print(combined)
print(list_a) # Original list unchanged
[1, 2, 3, 4, 5, 6]
[1, 2, 3]
The + operator returns a new list. It works like extend() in terms of the result. But it is less memory efficient for large lists because it creates a copy.
Using List Slicing
List slicing can also append a list to another. You assign to a slice at the end of the list. This modifies the original list in place.
This method is less common but still useful. It works similarly to extend().
# Using slicing to append elements from another list
main_list = [1, 2, 3]
new_list = [4, 5, 6]
main_list[len(main_list):] = new_list
print(main_list)
[1, 2, 3, 4, 5, 6]
The slice main_list[len(main_list):] targets the end of the list. Assigning new_list to it adds all elements. This is an in-place operation.
This method can be faster than extend() in some cases. But it is less readable for most programmers. Stick with extend() unless you have a specific performance reason.
Performance Considerations
When appending large lists, performance matters. The extend() method is generally the fastest. It is optimized for this task.
The + operator is slower for large lists. It creates a new list and copies all elements. This uses more memory and time.
Using slicing is also fast. But it can be confusing. For most cases, extend() is the best choice.
If you need to remove items from a list, see our article on Python List Remove Last Element for more details.
Common Mistakes
Beginners often confuse append() and extend(). Using append() when you want extend() creates nesting. This can cause bugs.
Another mistake is forgetting that append() and extend() modify the list in place. They return None. Do not assign their result to a variable.
# Common mistake: assigning the result of extend()
my_list = [1, 2, 3]
result = my_list.extend([4, 5])
print(result) # Outputs None
print(my_list) # Outputs [1, 2, 3, 4, 5]
None
[1, 2, 3, 4, 5]
Always use extend() directly. Do not assign it to a variable unless you want None.
When to Use Each Method
Use append() when you want to add a list as a single element. This creates nested lists.
Use extend() when you want to merge the items of another list into the original. This keeps the list flat.
Use the + operator when you need a new list without modifying the originals.
Use slicing only if you need a specific in-place operation that extend() cannot handle.
For a complete overview of list operations, read our Python List Operations Guide for Beginners.
Conclusion
Appending a list to another list is a fundamental skill in Python. The append() method adds the list as a single element. The extend() method adds each element individually. The + operator creates a new combined list. List slicing offers another in-place option.
Choose the method that fits your goal. For most merging tasks, extend() is the best choice. It is fast, readable, and efficient.
Practice these methods with small examples. Soon you will use them without thinking. Happy coding!