You can create an empty list in Python with a pair of square brackets, items = [], or with items = list(). Both give you a new list with no elements. I use [], because it’s shorter and faster:
cart = [] # empty list
cart = list() # same result
Python 3.12.5 produced the outputs below, and mypy checked the type-hint example.
You’ll see how the two forms compare, which one is faster, how to type an empty list, and the two traps that make “empty” lists share data when you don’t expect it.
Create an empty list with [] or list()
Each [] or list() makes a separate list. They’re equal while both are empty, but they’re never the same object:
cart = []
wishlist = list()
print(cart, wishlist, type(cart).__name__)
print("length:", len(cart), "| truthy?", bool(cart))
print("equal:", cart == wishlist, "| same object:", cart is wishlist)
cart.append("Coffee beans")
print("after append:", cart, "| wishlist still:", wishlist)
Output:
[] [] list
length: 0 | truthy? False
equal: True | same object: False
after append: ['Coffee beans'] | wishlist still: []
![create an empty list in python brackets list command prompt Command Prompt output of Python creating empty lists with [] and list(), showing type, length, truthiness, equality and identity](https://pythonguides.com/wp-content/uploads/2026/10/create-an-empty-list-in-python-brackets-list-command-prompt.png)
Once you have the list, filling it is usually a loop with append(); I cover that in adding elements to an empty list in Python.
Is [] faster than list() in Python?
Yes. [] is built straight into the bytecode, while list() has to look up the name and call it. The gap is tiny per call, but it’s measurable:
import timeit
n = 5_000_000
brackets = timeit.timeit("[]", number=n)
function = timeit.timeit("list()", number=n)
print(f"[] {brackets:.3f} s for {n:,} lists")
print(f"list() {function:.3f} s for {n:,} lists")
print(f"[] is about {function / brackets:.1f}x faster")
print(list("TX"), list(range(3)), list({"a": 1})) # list() is for converting things
Output:
[] 0.078 s for 5,000,000 lists
list() 0.141 s for 5,000,000 lists
[] is about 1.8x faster
['T', 'X'] [0, 1, 2] ['a']
![python empty list brackets vs list function speed command prompt Command Prompt timing of five million empty lists created with [] versus list() in Python](https://pythonguides.com/wp-content/uploads/2026/10/python-empty-list-brackets-vs-list-function-speed-command-prompt.png)
[] wins clearly. list() earns its place when you convert something else into a list.So use [] for a new empty list and list(x) for converting a string, range or other iterable. More on making lists with starting values is in creating a list in Python.
Why do my empty lists share the same items?
Two common patterns look like they make fresh empty lists but don’t. A default argument like cart=[] is created once, and [[]] * 3 repeats one list three times:
def add_item(item, cart=[]): # the default list is created ONCE
cart.append(item)
return cart
print(add_item("Mug"))
print(add_item("Filters")) # still holds "Mug" from the first call!
def add_item_fixed(item, cart=None):
if cart is None:
cart = [] # a fresh empty list every call
cart.append(item)
return cart
print(add_item_fixed("Mug"), add_item_fixed("Filters"))
rows = [[]] * 3 # three references to ONE list
rows[0].append("Austin")
print("[[]] * 3:", rows)
rows = [[] for _ in range(3)] # three separate empty lists
rows[0].append("Austin")
print("comprehension:", rows)
Output:
['Mug']
['Mug', 'Filters']
['Mug'] ['Filters']
[[]] * 3: [['Austin'], ['Austin'], ['Austin']]
comprehension: [['Austin'], [], []]
![python mutable default argument empty list trap command prompt Command Prompt output of the Python mutable default argument trap with an empty list, the None fix, and [[]] * 3 versus a list comprehension](https://pythonguides.com/wp-content/uploads/2026/10/python-mutable-default-argument-empty-list-trap-command-prompt.png)
[[]] * 3 changes all three.Use None as the default and create the list inside the function. For lists of empty lists, use a comprehension; there are more patterns in initializing a list of size N in Python.
Type hints for an empty list
An empty list doesn’t tell a type checker what it will hold, so annotate it. Then tools like mypy catch the wrong type going in, even though Python itself runs the code anyway:
orders: list[str] = [] # an empty list that should only hold strings
totals: list[float] = []
orders.append("A-1009")
totals.append(49.99)
orders.append(1010) # mypy flags this before you run anything
print(orders, totals)
python -m mypy typed_lists.py
python typed_lists.py
Output:
typed_lists.py:6: error: Argument 1 to "append" of "list" has incompatible type "int"; expected "str" [arg-type]
Found 1 error in 1 file (checked 1 source file)
['A-1009', 1010] [49.99]
![python typed empty list mypy error command prompt Command Prompt output of mypy reporting an int appended to a list annotated as list[str], then Python running the script anyway](https://pythonguides.com/wp-content/uploads/2026/10/python-typed-empty-list-mypy-error-command-prompt.png)
list[str]; plain Python doesn’t check and prints the mixed list.Use list[str] on Python 3.9 and later; older code imports List from typing. If you’re unsure what a variable holds at runtime, checking whether a list is empty and isinstance() help.
Make an existing list empty again
Assigning [] creates a new list for that one name. clear() empties the list itself, so every other reference sees it too:
cart = ["Coffee beans", "Mug"]
saved = cart # another name for the same list
cart = [] # makes a NEW empty list for 'cart' only
print("cart:", cart, "| saved:", saved)
cart = saved
cart.clear() # empties the list everyone shares
print("cart:", cart, "| saved:", saved)
if not cart:
print("The cart is empty.")
Output:
cart: [] | saved: ['Coffee beans', 'Mug']
cart: [] | saved: []
The cart is empty.
Pick based on whether other code should keep the old items. I compare more options in clearing a list in Python.
Empty list options at a glance
| Goal | Use |
|---|---|
| New empty list | items = [] |
| Convert an iterable to a list | list(iterable) |
| Empty list as a default argument | items=None, then items = [] inside |
| Several separate empty lists | [[] for _ in range(n)] |
| Empty a list everyone shares | items.clear() |
Here are more list guides to read next:
- Add an element to the beginning of a list
- Remove duplicates from a list in Python
- Flatten a list of lists in Python
- Copy elements from one list to another
Frequently asked questions
How do I create an empty list in Python?
Write my_list = [], or my_list = list(). Both create a new list with no elements.
Is [] or list() better?
[] is shorter and faster. Use list() when you’re converting another iterable.
How do I check if a list is empty?
Use if not my_list:. An empty list counts as False.
Why does my function keep items between calls?
A default of [] is created once. Use None as the default and create the list inside the function.
How do I create several empty lists?
Use [[] for _ in range(n)]. [[]] * n repeats the same list n times.
Where are Python lists documented?
See Lists in the Python docs.

Bijay Kumar is a 13-time Microsoft MVP with more than 18 years in software development, and the founder of Python Guides and TSinfo Technologies. He started out building .NET and SharePoint solutions at HP, TCS and KPIT before moving into Python, machine learning and AI, and he also builds web apps with TypeScript and React. He writes the tutorials here himself, and every example is run before publishing so you see the real output. More about Bijay · Microsoft MVP profile · LinkedIn