Free tutorials in Hindi & English Daily computer, mobile and IT guides Beginner friendly learning
Blog · Python · 04 Jul 2026 · Hindi + English

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

List is mutable, tuple is immutable — but there are 6 more differences interviewers expect. Full comparison table with memory and speed proof.

The one-line answer

List is mutable (can be changed after creation), tuple is immutable (locked after creation). List uses [ ], tuple uses ( ). But interviews expect more — here are all 7 differences.
my_list  = [10, 20, 30]     # list  - square brackets
my_tuple = (10, 20, 30)     # tuple - round brackets

my_list[0]  = 99            # OK: list changed
my_tuple[0] = 99            # TypeError: 'tuple' object does not
                            # support item assignment

Full comparison table (7 differences)

PointListTuple
MutabilityMutable — add/remove/changeImmutable — locked forever
Syntax[1, 2, 3](1, 2, 3)
Methods11+ (append, remove, sort...)Only 2 (count, index)
SpeedSlowerFaster (fixed size)
MemoryMore (extra space for growth)Less (exact fit)
Dictionary key❌ Cannot be a dict key✅ Can be a dict key
Use caseData that changes (cart items)Fixed data (coordinates, dates)

Memory proof (run this yourself)

import sys

l = [10, 20, 30, 40, 50]
t = (10, 20, 30, 40, 50)

print("List size :", sys.getsizeof(l), "bytes")
print("Tuple size:", sys.getsizeof(t), "bytes")
List size : 104 bytes Tuple size: 80 bytes

Same 5 items, tuple takes less memory — because a list reserves extra space for future growth, a tuple never grows.

The dictionary-key difference (interview favourite)

locations = { (28.61, 77.20): "Delhi" }     # tuple key: OK
print(locations[(28.61, 77.20)])

wrong = { [28.61, 77.20]: "Delhi" }         # TypeError:
                                            # unhashable type: 'list'
Delhi

Only immutable objects can be dictionary keys. Since a tuple cannot change, Python can hash it; a list can change, so it cannot be hashed.

When to use which?

  • Use a list when data will change: shopping cart, student attendance, todo items.
  • Use a tuple when data must never change: (latitude, longitude), RGB colours, date of birth, function returning multiple values.
  • Interview line: "Tuple is a read-only list — safer, faster and hashable."

One-line answer

List mutable है (बनने के बाद बदल सकती है), tuple immutable है (बनने के बाद locked). List [ ] use करती है, tuple ( ). लेकिन interviews में और expect किया जाता है — यहां सभी 7 अंतर हैं.
my_list  = [10, 20, 30]     # list  - square brackets
my_tuple = (10, 20, 30)     # tuple - round brackets

my_list[0]  = 99            # OK: list बदल गई
my_tuple[0] = 99            # TypeError: 'tuple' object does not
                            # support item assignment

पूरी comparison table (7 अंतर)

PointListTuple
MutabilityMutable — add/remove/changeImmutable — हमेशा के लिए locked
Syntax[1, 2, 3](1, 2, 3)
Methods11+ (append, remove, sort...)सिर्फ 2 (count, index)
Speedधीमीतेज़ (fixed size)
Memoryज़्यादा (growth के लिए extra space)कम (exact fit)
Dictionary key❌ dict key नहीं बन सकती✅ dict key बन सकता है
Use caseबदलने वाला data (cart items)Fixed data (coordinates, dates)

Memory proof (खुद run करके देखें)

import sys

l = [10, 20, 30, 40, 50]
t = (10, 20, 30, 40, 50)

print("List size :", sys.getsizeof(l), "bytes")
print("Tuple size:", sys.getsizeof(t), "bytes")
List size : 104 bytes Tuple size: 80 bytes

Same 5 items, tuple कम memory लेता है — क्योंकि list future growth के लिए extra space reserve करती है, tuple कभी grow नहीं होता.

Dictionary-key वाला अंतर (interview favourite)

locations = { (28.61, 77.20): "Delhi" }     # tuple key: OK
print(locations[(28.61, 77.20)])

wrong = { [28.61, 77.20]: "Delhi" }         # TypeError:
                                            # unhashable type: 'list'
Delhi

सिर्फ immutable objects dictionary keys बन सकते हैं. Tuple बदल नहीं सकता, इसलिए Python उसे hash कर सकता है; list बदल सकती है, इसलिए hash नहीं हो सकती.

कब कौन-सा use करें?

  • List use करें जब data बदलेगा: shopping cart, student attendance, todo items.
  • Tuple use करें जब data कभी नहीं बदलना चाहिए: (latitude, longitude), RGB colours, date of birth, function से multiple values return.
  • Interview line: "Tuple एक read-only list है — safer, faster और hashable."

Frequently Asked Questions

What is the main difference between list and tuple?

A list is mutable — items can be added, removed or changed after creation — while a tuple is immutable and cannot be modified once created.

Why is a tuple faster than a list?

A tuple has a fixed size, so Python allocates exact memory once and applies internal optimizations, while a list keeps extra space and bookkeeping for growth.

Can a tuple be used as a dictionary key?

Yes, because tuples are immutable and therefore hashable. Lists cannot be dictionary keys since they can change.