October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk1 min

How to Convert a List to a Tuple in Python

Use Python’s built-in tuple() constructor to create a tuple from a list without changing the original list. The conversion preserves item order and is shallow.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Call Python’s built-in tuple() constructor: result = tuple(items). It creates a tuple containing the list’s items in the same order and leaves the original list unchanged.

Convert a list with tuple()

Pass the list to the constructor:

items = [1, 2, 3]
result = tuple(items)

print(result)  # (1, 2, 3)
print(type(result))  # <class 'tuple'>
print(type(items))  # <class 'list'>

tuple(iterable) builds a tuple from an iterable’s items, preserving their order. Lists, other sequences, iterable containers and iterators can be passed to it. If the input is already a tuple, tuple() returns it unchanged. See the Python 3.14.8 built-in types documentation.

Does converting the list change it?

No. tuple(items) creates a tuple value; it does not turn items into a tuple or modify the list. You can keep using the original list separately:

items = [1, 2, 3]
result = tuple(items)

items.append(4)
print(items)   # [1, 2, 3, 4]
print(result)  # (1, 2, 3)

What happens to nested lists and other mutable items?

The conversion is shallow: it changes the outer container, but does not recursively convert objects inside the list. For example, inner lists remain lists:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
nested = [[1, 2], [3, 4]]
result = tuple(nested)

print(result)  # ([1, 2], [3, 4])

A tuple’s elements cannot be reassigned, but an element can refer to a mutable object such as a list. That object can still be modified through the tuple:

result[0].append(5)
print(result)  # ([1, 2, 5], [3, 4])

In other words, tuple immutability prevents changing the tuple’s sequence of references; it does not make every object reachable through the tuple immutable. The Python tutorial’s data-structures section illustrates this distinction.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Empty and one-item tuples

tuple() or () creates an empty tuple. To create a one-item tuple from a list, use tuple([value]). When writing a tuple literal directly, include a comma after the item:

empty = ()
one_item = (value,)
not_a_tuple = (value)

The comma—not the parentheses—is what makes (value,) a tuple. Parentheses can still make tuple expressions clearer and are needed in some syntax contexts. The comma rule is documented in the Python built-in types reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.