When I started working with Python lists, I often needed to copy elements from one list to another. At first, I thought it would be as simple as assigning one list to another. But then I learned that an assignment creates a reference, not a true copy.
I’ve tried different methods to copy lists in real-world projects. Some methods are quick and simple, while others give you more control, especially when working with nested lists.
In this tutorial, I’ll show you six different ways to copy elements from one list to another in Python. Each method is easy to understand, and I’ll explain when you should use it.
Copy Lists in Python
In Python, lists are mutable. That means if you assign one list to another, both lists will point to the same memory location. Any change in one will affect the other.
This is fine in some situations, but in most real-world applications, you’ll need independent copies. For example, imagine you’re working with a dataset of customer orders in the USA. You might want to create a backup copy of the list before applying filters or transformations.
So, knowing the right way to copy lists is essential.
Method 1 – Use the copy() Method
The simplest way to copy a list is by using the built-in copy() method in Python.
# Original list of customer states
states = ["California", "Texas", "Florida", "New York", "Illinois"]
# Copying the list
states_copy = states.copy()
print("Original:", states)
print("Copied:", states_copy)
# Modifying the copied list
states_copy.append("Ohio")
print("After modification:")
print("Original:", states)
print("Copied:", states_copy)You can refer to the screenshot below to see the output.

Here, the states_copy list is independent of the original. Adding “Ohio” to the copy doesn’t affect the original list.
This method is perfect when you’re working with simple lists that don’t contain nested objects.
Method 2 – Use List Slicing
Another common way to copy a Python list is by slicing it with [:].
# Original list of US cities
cities = ["Los Angeles", "Houston", "Miami", "Chicago", "Phoenix"]
# Copying using slicing
cities_copy = cities[:]
print("Original:", cities)
print("Copied:", cities_copy)
# Changing the copy
cities_copy.remove("Miami")
print("After removing from copy:")
print("Original:", cities)
print("Copied:", cities_copy)You can refer to the screenshot below to see the output.

This method is short and effective. I often use slicing when I quickly need a shallow copy of a list.
Method 3 – Use the list() Constructor
You can also create a copy by passing the original list to the list() constructor in Python.
# Original list of US universities
universities = ["Harvard", "Stanford", "MIT", "Yale", "Princeton"]
# Copying with list()
universities_copy = list(universities)
print("Original:", universities)
print("Copied:", universities_copy)
# Modify the copy
universities_copy.append("Columbia")
print("After modification:")
print("Original:", universities)
print("Copied:", universities_copy)You can refer to the screenshot below to see the output.

This method is clear and readable. I prefer it when I want my code to be explicit and beginner-friendly.
Method 4 – Use the copy Module (copy.copy())
Python’s copy module provides a function called copy() for shallow copies.
import copy
# Original list of US sports
sports = ["Baseball", "Basketball", "Football", "Soccer"]
# Shallow copy
sports_copy = copy.copy(sports)
print("Original:", sports)
print("Copied:", sports_copy)
# Modify the copy
sports_copy.append("Hockey")
print("After modification:")
print("Original:", sports)
print("Copied:", sports_copy)The result is the same as the earlier methods. The main difference is that this method is more flexible when you’re working with custom objects.
Method 5 – Use the copy.deepcopy() Function
When you’re working with nested lists, shallow copies are not enough. That’s where Python’s deepcopy() comes in.
import copy
# Original list with nested lists
orders = [["Order1", "Shipped"], ["Order2", "Pending"], ["Order3", "Delivered"]]
# Deep copy
orders_copy = copy.deepcopy(orders)
print("Original:", orders)
print("Copied:", orders_copy)
# Modify nested list in the copy
orders_copy[1][1] = "Shipped"
print("After modification:")
print("Original:", orders)
print("Copied:", orders_copy)Here, changing the nested element in the copy does not affect the original list. This is very useful when working with hierarchical data, like customer orders or product catalogs.
Method 6 – Use the * Operator
Another neat way to copy a list is by unpacking it with the * operator in Python.
# Original list of US car brands
cars = ["Ford", "Chevrolet", "Tesla", "Dodge"]
# Copy using * operator
cars_copy = [*cars]
print("Original:", cars)
print("Copied:", cars_copy)
# Modify the copy
cars_copy.append("Jeep")
print("After modification:")
print("Original:", cars)
print("Copied:", cars_copy)This method is concise and works well for shallow copies.
Which Method Should You Use?
- If you’re working with simple lists, use copy(), slicing, or the list() constructor.
- If you’re working with nested lists, use copy.deepcopy().
- If you want a quick shorthand, slicing ([:]) or the * operator works great.
I use slicing most often for quick tasks, and deepcopy() when I know I’m dealing with nested structures.
Real-World Example – Copy and Backing Up a Dataset
Let me show you a real-world style example. Suppose you have a list of customer names from different US states, and you want to create a backup before modifying it.
import copy
# Original dataset
customers = [
["John", "California"],
["Emma", "Texas"],
["Michael", "Florida"],
["Sophia", "New York"]
]
# Create a deep copy for backup
backup_customers = copy.deepcopy(customers)
# Modify the original dataset
customers[0][1] = "Nevada"
print("Original:", customers)
print("Backup:", backup_customers)Here, the backup remains unchanged even after modifying the original. This is exactly the kind of scenario I’ve faced in data processing projects.
When I look back, I realize how important it was to understand the difference between shallow and deep copies. It saved me from subtle bugs in production code.
Now, whenever I need to duplicate lists in Python, I know exactly which method to use.
You may also read:
- Randomly Select from a List in Python
- Remove Duplicates from a List in Python
- Find Duplicates in a Python List
- Create an Empty List in Python

I am Bijay Kumar, a Microsoft MVP in SharePoint. Apart from SharePoint, I started working on Python, Machine learning, and artificial intelligence for the last 5 years. During this time I got expertise in various Python libraries also like Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… for various clients in the United States, Canada, the United Kingdom, Australia, New Zealand, etc. Check out my profile.