Ways to Concatenate Multiple Lists in Python

When I was working on a project where I had to combine multiple lists of customer data into one. Since I have been programming in Python for more than 10 years, I knew there were several ways to do this.

The challenge was not just about joining lists but also about choosing the most efficient and readable method. Over the years, I have tried different approaches, and in this tutorial, I will show you the ones that work best.

In this article, I will cover multiple ways to concatenate lists in Python. I will also share the advantages of each method so you can decide which one fits your project.

Method 1: Concatenate Lists Using the + Operator

The simplest way I use to join two or more lists is with the + operator.

# Example: Using + operator to concatenate lists
list1 = ["New York", "Los Angeles", "Chicago"]
list2 = ["Houston", "Phoenix"]
list3 = ["Philadelphia", "San Antonio"]

combined = list1 + list2 + list3
print(combined)

Output:

['New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix', 'Philadelphia', 'San Antonio']

You can see the output in the screenshot below.

concatenate lists python

This method is clean and easy to read. However, it creates a new list each time, which may not be the most efficient when working with very large lists.

Method 2: Concatenate Lists Using extend()

When I want to modify an existing list instead of creating a new one, I use Python’s extend() method.

# Example: Using extend() method
list1 = ["Apple", "Banana"]
list2 = ["Grapes", "Orange"]
list3 = ["Mango", "Peach"]

list1.extend(list2)
list1.extend(list3)

print(list1)

Output:

['Apple', 'Banana', 'Grapes', 'Orange', 'Mango', 'Peach']

You can see the output in the screenshot below.

python concatenate lists

The extend() method in Python updates the original list in place, which makes it memory efficient.

Method 3: Concatenate Lists Using List Comprehension

Sometimes, I prefer list comprehension because it gives me flexibility to add conditions while joining lists.

# Example: Using list comprehension
list1 = [1, 2, 3]
list2 = [4, 5, 6]
list3 = [7, 8, 9]

combined = [item for sublist in [list1, list2, list3] for item in sublist]
print(combined)

Output:

[1, 2, 3, 4, 5, 6, 7, 8, 9]

You can see the output in the screenshot below.

python concatenate multiple lists

This method is useful when I want to filter or transform elements while concatenating.

Method 4: Concatenate Lists Using itertools.chain()

For large datasets, I often use the itertools module because it is memory-efficient.

import itertools

# Example: Using itertools.chain
list1 = ["TX", "CA"]
list2 = ["NY", "FL"]
list3 = ["WA", "NV"]

combined = list(itertools.chain(list1, list2, list3))
print(combined)

Output:

['TX', 'CA', 'NY', 'FL', 'WA', 'NV']

You can see the output in the screenshot below.

concatenate multiple lists python

Python’s chain() function is fast and efficient when dealing with many lists.

Method 5: Concatenate Lists Using Unpacking (*)

With Python 3.5 and above, I often use the unpacking operator * for a clean syntax.

# Example: Using unpacking *
list1 = ["Dallas", "Austin"]
list2 = ["Seattle", "Portland"]
list3 = ["Miami", "Orlando"]

combined = [*list1, *list2, *list3]
print(combined)

Output:

['Dallas', 'Austin', 'Seattle', 'Portland', 'Miami', 'Orlando']

This method is concise and modern, and I use it frequently when writing new Python code.

Method 6: Concatenate Lists Using sum()

Although not the most efficient, I sometimes use Python’s sum() method with lists, especially for quick scripts.

# Example: Using sum()
list1 = [10, 20]
list2 = [30, 40]
list3 = [50, 60]

combined = sum([list1, list2, list3], [])
print(combined)

Output:

[10, 20, 30, 40, 50, 60]

I don’t recommend this for very large lists because it can be slower, but it’s still a neat trick.

Method 7: Concatenate Lists Using numpy.concatenate()

When working with numerical data, I often use NumPy.

import numpy as np

# Example: Using numpy.concatenate
list1 = [1, 2, 3]
list2 = [4, 5, 6]
list3 = [7, 8, 9]

combined = np.concatenate((list1, list2, list3))
print(combined)

Output:

[1 2 3 4 5 6 7 8 9]

This is extremely efficient when handling large numerical arrays, especially in data analysis projects.

Method 8: Concatenate Lists Using a Loop

Finally, for complete control, I sometimes use a simple loop.

# Example: Using a loop
list1 = ["A", "B"]
list2 = ["C", "D"]
list3 = ["E", "F"]

combined = []
for lst in [list1, list2, list3]:
    for item in lst:
        combined.append(item)

print(combined)

Output:

['A', 'B', 'C', 'D', 'E', 'F']

This method is longer but gives me the flexibility to add custom logic during concatenation.

Which Method Should You Use?

  • If you want simplicity, use the + operator.
  • If you want in-place updates, use extend().
  • If you want conditional merging, use list comprehension.
  • If you want efficiency with large datasets, use itertools.chain().
  • If you want modern clean syntax, use unpacking (*).
  • If you are working with numerical data, use NumPy.

When I first started coding in Python, I always used the + operator. But as my projects grew larger, I realized that choosing the right method can make a big difference in performance and readability.

Now, depending on the project, I switch between extend(), itertools.chain(), or unpacking. Each method has its place, and once you practice them, you’ll know which one feels right for your use case.

You may like to read:

51 Python Programs

51 PYTHON PROGRAMS PDF FREE

Download a FREE PDF (112 Pages) Containing 51 Useful Python Programs.

pyython developer roadmap

Aspiring to be a Python developer?

Download a FREE PDF on how to become a Python developer.

Let’s be friends

Be the first to know about sales and special discounts.