Python: Lists vs Tuples
Beginner
Python
Created by Best
· 12.04.2026 at 16:05 UTC
Lists and tuples are both sequences in Python, but they differ in mutability and use.
List – mutable: you can add, remove, or change elements after creation.
- lst = [1, 2, 3]
- lst.append(4) is valid.
Tuple – immutable: once created, you cannot change its contents.
- t = (1, 2, 3)
- t.append(4) would raise an error.
When to use which: Use lists when the collection may change. Use tuples for fixed data (e.g. coordinates, config pairs) and wherever immutability is desired (e.g. as dictionary keys).
University approvals: 0
Tasks
Card Info
- Topic: Python
- Difficulty: Beginner
- Completed: 0 users
Creator
Best
BestBuddy