Tuples in Python: fixed, unchangeable sequences
A tuple is like a list that can't change. That sounds like a limitation, but it's exactly what you want for things that come as a fixed set — an (x, y) point, an (r, g, b) color.
The big idea
A tuple is an ordered, immutable sequence written with parentheses: once created, its items can't be changed.
See it in code
A tuple is a fixed sequence written with parentheses. A position is naturally a pair, so we store it as (120, 250) and index it like a list:
position = (120, 250)
print("x is", position[0])
print("y is", position[1])x is 120 y is 250
position[0] and position[1] pull out each half — the same square brackets a list uses.
Better than indexing: unpack the tuple into named variables in one line. x, y = position splits the pair straight into x and y:
position = (120, 250)
x, y = position
print("x =", x, "y =", y)x = 120 y = 250
One clean line instead of position[0] and position[1]. Now let's unpack a position and use it to draw.
Here the tuple (250, 250) is a star's position, and the colour is a tuple too. We unpack the position into x and y, then draw:
from art import Canvas, star
screen = Canvas.create()
Canvas.fill(screen)
position = (250, 250)
x, y = position
gold = (255, 205, 86)
star(screen, x, y, size=120, color=gold)
print("Unpacked:", x, y)
print("position is a", type(position).__name__)Unpacked: 250 250 position is a tuple

x, y = position is the same unpacking from the warm-up, now feeding star(). And because the tuple is immutable, position[0] = 300 would raise an error: a fixed pair stays fixed.
Tuples shine wherever a value is a fixed bundle: coordinates, colors, a function returning several results (return x, y), a date as (year, month, day), or a dictionary key (lists can't be keys, tuples can). Their immutability is a feature — it signals 'this shouldn't change' and makes the data safe to share.
Try it yourself
Return two values from a function — return x, y — and unpack them at the call site. Then try to reassign position[0] and read the TypeError that proves a tuple is immutable.
The common mistake
Trying to modify a tuple, or forgetting the comma for a single-item tuple. (5) is just the number 5 in parentheses; a one-element tuple needs the trailing comma: (5,). And to 'change' a tuple, you build a new one — you can't edit it in place.
What it unlocks
Tuples complement lists, package coordinates and RGB colors, and unpack cleanly in loops and returns.