Skip to main content

How to Turn a Tuple into a List in Python with list()

· 3 min read
Jagdish Kumawat
Founder @ Dewiride

A tuple can't be changed after it's made: no append, no removing items. When you need a changeable version, list() makes a new list with the same items in the same order. This guide does it on Python 3.15.2.

Syntax​

Syntax
<new_list> = list(<tuple>)
PartWhat it means
list(<tuple>)Builds a new list with the tuple's items, in the same order
<new_list>The list you can now change. The tuple stays as it was

The Python documentation says: "The constructor builds a list whose items are the same and in the same order as iterable's items", and gives this exact case: "list( (1, 2, 3) ) returns [1, 2, 3]."

The Example​

A tuple holds three colours. The script turns it into a list, adds a fourth colour to the list, and prints both.

Prerequisites​

  • uv and Python 3. This guide uses uv 0.13.10 with Python 3.15.2, in a project made with uv init.

Step 1: Write the Script​

colors.py
colors = ("red", "green", "blue")

color_list = list(colors)
color_list.append("yellow")

print(colors)
print(color_list)

The colors.py script in a macOS-style code window: a tuple of red, green and blue, list(colors) stored as color_list, yellow appended to the list, then both printed.

Step 2: Run It​

Terminal
uv run python colors.py
Output
('red', 'green', 'blue')
['red', 'green', 'blue', 'yellow']

The terminal after uv run python colors.py: ('red', 'green', 'blue'), then ['red', 'green', 'blue', 'yellow'].

The tuple, in round brackets, still has its three colours. The list, in square brackets, got the fourth. They're two separate objects. The command works unchanged in PowerShell.

Common Mistakes​

MistakeWhat happensDo this instead
Calling append on the tuple itselfAttributeError: 'tuple' object has no attribute 'append'Turn it into a list first, then append
Passing a single string to list()You get its letters: list("abc") gave ['a', 'b', 'c']Put the string in a list: ["abc"]

FAQ​

How do I turn the list back into a tuple?​

Use tuple(): tuple(color_list).

Does it work for a tuple with one item?​

Yes: list(("solo",)) gave ['solo']. Note the comma: ("solo") without it is just the string in brackets.

Conclusion​

list(colors) made a new list with the tuple's three colours. The list took a fourth with append, and the tuple stayed unchanged.

Additional Resources​