Lists + Dictionaries
A list of dictionaries represents a table of records where each dict is one row
What it does: & gives items that appear in both sets. 2 and 3 are in both a and b. - is difference — items in the left set but not the right. ^ is symmetric difference — items in either set but not both. Think of | as 'OR' — items in set A OR set B (or both). Think of & as 'AND' — items in set A AND set B. issubset checks if every item in the first set exists in the second. union() and | both combine all items — intersection() and & find common items. | & - ^ all return new sets; use |= &= etc. to modify in place.
Common mistakes: Sets don't support + for union. Use | or .union(). Use & for set intersection, not 'and' (which is a boolean operator).
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
UnionFill 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 →