PYTHON INTERMEDIATEChapter 6 · Comprehensions and data tools
Sets and tuples
A tuple is an immutable list written with parentheses (). A set is an unordered collection of unique elements written with curly braces {}.
Worked example
How it reads
- point = (10, 20) defines an immutable tuple
- {"wispy", "puffy", "wispy"} creates a set, filtering out duplicates

Cloud tip: Use sets when checking membership or removing duplicates, and tuples for structured coordinates or records.


