Tuples – Basics
A tuple is an immutable ordered sequence of values defined with parentheses or commas
What it does: Python evaluates the right side as a tuple before assigning. Returning x, y is shorthand for returning the tuple (x, y). Returning multiple values with commas automatically packs them into a tuple. A point (x, y) shouldn't be modified - immutability signals intent and prevents bugs. Dict keys must be hashable - tuples qualify, lists don't because they can change. divmod returns a tuple of (quotient, remainder) - 17 / 5 is 3 remainder 2. The star operator collects remaining items into a list, not a tuple. Use a tuple when the data won't change - a list when you need to add, remove, or reorder.
Common mistakes: Python can swap in one line: no temp variable needed. Lists can't be dict keys (mutable). Use a tuple.
Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
return a, bFill in the Blanks
Spot the Error
Create a free class, add this module to a journey, and track who's stuck.
Create a free teacher account →No credit card. No setup fee. Make a class and invite students in under three minutes.
Practice this topic interactively, track progress, and unlock badges.
Start Learning Free →