Advertisement
Working with lists in Python is pretty common. Whether pulling data from APIs, combining inputs from different users, or just reorganizing things in a script, you'll eventually need to merge two lists. The idea is simple: take items from two lists and put them into one. But being flexible, Python gives you many ways to do it. Some are fast and clean, others give you more control. This article breaks down the main methods to merge lists, explains what each does, and when you might pick one over the other. No fluff—just practical stuff that helps you write better Python.
This is probably the first method most people come across. You just use the + symbol to combine two lists.
list1 = [1, 2, 3]
list2 = [4, 5, 6]
merged = list1 + list2
print(merged) # [1, 2, 3, 4, 5, 6]
The original lists haven't changed. A new list is returned, so it's safe if you don't want to mess with your original data.

The extend() method is used when you want to add all items from one list to another. Unlike +, it modifies the list in place.
list1 = [1, 2, 3]
list2 = [4, 5, 6]
list1.extend(list2)
print(list1) # [1, 2, 3, 4, 5, 6]
This is memory-efficient since it doesn’t make a new list but changes the first list. Use this if you don’t need to keep the original version.
This method unpacks the elements of each list into a new one using the * operator inside square brackets.
list1 = [1, 2, 3]
list2 = [4, 5, 6]
merged = [*list1, *list2]
print(merged) # [1, 2, 3, 4, 5, 6]
It’s concise and clean. Good for cases where you want readability and a new list without touching the originals.
Using itertools.chain()
Itertools.chain() from the itertools module is useful for longer or more complex merges. It's efficient and lazy—it creates an iterator that only evaluates items as needed.
from itertools import chain
list1 = [1, 2, 3]
list2 = [4, 5, 6]
merged = list(chain(list1, list2))
print(merged) # [1, 2, 3, 4, 5, 6]
Best if you're dealing with large data and want to save memory. It’s more advanced, but worth knowing.
This is the more manual way. You just loop through the second list and add each item to the first.
list1 = [1, 2, 3]
list2 = [4, 5, 6]
for item in list2:
list1.append(item)
print(list1) # [1, 2, 3, 4, 5, 6]
It's not fancy, but it works. If you're doing more than merging—like filtering or modifying items—a loop gives you more control.
This method gives you a new list using a single expression. It’s great when you want to do something extra while merging.
list1 = [1, 2, 3]
list2 = [4, 5, 6]
merged = [item for item in list1] + [item for item in list2]
print(merged) # [1, 2, 3, 4, 5, 6]
You can also add logic:
merged = [item for item in list1 + list2 if item % 2 == 0]
print(merged) # [2, 4, 6]
Good when you want to filter or tweak while merging.
This trick is not always recommended, but it's still an option. You can "sum" a list of lists using sum() with an empty list as the starting point.
lists = [[1, 2], [3, 4], [5, 6]]
merged = sum(lists, [])
print(merged) # [1, 2, 3, 4, 5, 6]
For just two lists, it’s overkill:
merged = sum([[1, 2, 3], [4, 5, 6]], [])
It's not the most efficient for large lists but works when merging many small ones.

This method is fast and straightforward if you're doing numerical work and using NumPy.
import numpy as np
list1 = np.array([1, 2, 3])
list2 = np.array([4, 5, 6])
merged = np.concatenate((list1, list2))
print(merged) # [1 2 3 4 5 6]
This returns a NumPy array, not a regular Python list. It’s useful if you’re doing number crunching and performance matters.
The reduce() function from the functools module can merge lists by repeatedly applying a function. It's usually used for calculations, but you can apply it to list merging too. When you have many lists and want to join them into one, reduce() does the job cleanly.
from functools import reduce
lists = [[1, 2], [3, 4], [5, 6]]
merged = reduce(lambda x, y: x + y, lists)
print(merged) # [1, 2, 3, 4, 5, 6]
It’s useful when you’re working with many lists and prefer a functional approach.
iconcat() is a function from the operator module that works like += for lists. It modifies the first list and adds items from the second. It's faster than + because it avoids making a copy.
import operator
list1 = [1, 2, 3]
list2 = [4, 5, 6]
operator.iconcat(list1, list2)
print(list1) # [1, 2, 3, 4, 5, 6]
Use this if you already use the operator module or need fast in-place merging without .extend().
Python gives you many ways to merge lists. If you want something quick and clean, use + or unpacking. Extend () or itertools.chain() if you care about memory or performance. For special cases, like working with numbers or wanting to filter on the fly, try NumPy or list comprehensions. None of these methods are wrong—they just serve different needs. Choose based on what you're doing, whether it's speed, clarity, or flexibility. Once you've tried them a few times, you'll get a feel for which fits best in your workflow. Python's simplicity is in giving you the tools and letting you pick how you want to work.
Advertisement
Wondering whether a data lake or data warehouse fits your needs? This guide explains the differences, benefits, and best use cases to help you pick the right data storage solution
Accelerate AI with AWS GenAI tools offering scalable image creation and model training using Bedrock and SageMaker features
Nvidia NeMo Guardrails enhances AI chatbot safety by blocking bias, enforcing rules, and building user trust through control
Achieve lightning-fast SetFit Inference on Intel Xeon processors with Hugging Face Optimum Intel. Discover how to reduce latency, optimize performance, and streamline deployment without compromising model accuracy
Get full control over Python outputs with this clear guide to mastering f-strings in Python. Learn formatting tricks, expressions, alignment, and more—all made simple
An AI health care company is transforming diagnostics by applying generative AI in radiology, achieving a $525M valuation while improving accuracy and supporting clinicians
IBM showcased its agentic AI at RSAC 2025, introducing a new approach to autonomous security operations. Learn how this technology enables faster response and smarter defense
Ready to make computers see like humans? Learn how to get started with OpenCV—install it, process images, apply filters, and build a real foundation in computer vision with just Python
Discover execution speed differences between C and Rust. Learn benchmarks, optimizations, and practical trade-offs for developers
How to approach AI implementation in the workplace by prioritizing people. Learn how to build trust, reduce uncertainty, and support workers through clear communication, training, and role transitions
Is the future of U.S. manufacturing shifting back home? Siemens thinks so. With a $190M hub in Fort Worth, the company is betting big on AI, automation, and domestic production
How IonQ advances AI capabilities with quantum-enhanced applications, combining stable trapped-ion technology and machine learning to solve complex real-world problems efficiently