🧩Tuple
Also known as Tuples, Tuple (Python)
A small, fixed group of values in order. It usually cannot be changed.
Think of it like
It is like a sealed egg box. The eggs stay in their spots and you cannot swap them.
Example
A map app stores a spot as (51.5, -0.1), the latitude and longitude of London.
Why it matters
A tuple says these values belong together and will not change. That guards against a slip that edits one by mistake.
Definition
Example code
python
point = (3, 4)
x, y = point
print(x)
# 3Common mistake
Key takeaways
- 1Fixed size. The number of items stays the same.
- 2Ordered spots. Each place can have a meaning.
- 3Usually unchangeable. Made once, then read.