7Solve Blog
Chapter NotesClass 11, Class 12, College

Difference Between List and Tuple in Python (With Table and Examples)

List vs tuple in Python compared — mutability, syntax, speed, memory, methods, when to use which — with runnable examples and the Class 12 exam questions on it.

17 September 2026·3 min read·7Solve Team

A list and a tuple both hold an ordered collection of items that you index from 0. The one difference that matters — a list can be changed after it is made; a tuple cannot — explains every other difference in the table.

The comparison table

FeatureListTuple
MutabilityMutableImmutable
Syntax[1, 2, 3](1, 2, 3) — the comma makes the tuple, the brackets are optional
Single element[5](5,) — trailing comma required
MethodsMany: append, insert, remove, pop, sort, reverse, extendTwo: count, index
SpeedSlightly slower to create and iterateSlightly faster
MemoryMore (room to grow)Less (fixed size)
As dictionary keyNot allowed (unhashable)Allowed, if its items are immutable
Typical useA collection that changes: marks entered one by one, a queue of tasksA fixed record: a coordinate (x, y), an RGB colour, a date (d, m, y)

Mutability, shown

marks = [72, 85, 90]
marks[0] = 75          # fine
marks.append(64)       # fine
print(marks)           # [75, 85, 90, 64]

point = (3, 4)
point[0] = 5           # TypeError: 'tuple' object does not support item assignment

You can build a new tuple from an old one — point = point + (0,) — but that creates a fresh object; the original never changed.

The trailing-comma trap

t = (5)      # this is an int
u = (5,)     # this is a tuple with one element
print(type(t), type(u))   # <class 'int'> <class 'tuple'>

Board papers love this line. The bracket is not what makes a tuple; the comma is. a = 1, 2 is also a tuple.

Packing, unpacking and swapping

Tuples make several everyday idioms clean:

p = 10, 20            # packing
x, y = p              # unpacking
a, b = b, a           # swap without a temporary variable
for i, name in enumerate(["Asha", "Ravi"]):   # enumerate yields tuples
    print(i, name)

Functions that "return two values" are returning one tuple: return q, r.

Which to use

A subtle one: mutable inside immutable

t = ([1, 2], "x")
t[0].append(3)     # allowed — the list inside changed, the tuple did not
print(t)           # ([1, 2, 3], 'x')

The tuple holds a reference to the list; that reference cannot be replaced, but the list it points to is still a list.

How it is tested

Frequently asked questions

What is the main difference between a list and a tuple?

A list is mutable — you can change, add or remove its elements after creation. A tuple is immutable — once created, its elements cannot be changed.

Can a tuple contain a list?

Yes. The tuple itself cannot be changed, but a mutable object inside it (like a list) can still be modified through its own methods.

How do I make a tuple with one element?

Add a trailing comma — (5,) is a tuple, (5) is just the integer 5 in brackets.

Do it on 7Solve

ShareWhatsAppXTelegram

Related reading

🧩
7Solve Chrome Extension

Snap any question on a page and solve it without leaving the tab. Best for desktop.

Add to Chrome →
📱
7Solve Android App

Study anywhere — Snap & Solve with the camera, every tool, and your progress with you.

Get it on Google Play →