Tuples
Build, index, slice; immutability; unpack; swap; nested with lists.
Lesson 13 · Tuples — Level I · Guide
August 13, 2026 · Bridge Academy Python Program
Learning goals
- Build tuples with parentheses: (1, 2, 3), (), and single-element (5,) (notice the comma). - Index and slice tuples the same way as lists: t[0], t[-1], t[1:3], t[::-1]. - Understand that tuples are immutable — you cannot change an item once the tuple is built. - Compare tuples and lists: same indexing/slicing/in/len, different brackets and mutability. - Unpack a tuple into separate variables and swap two variables using a tuple. - Count occurrences with .count(), find positions with .index(), concatenate with +, and repeat with *.
This lesson covers PCEP-30-02 objective 3.2.
Preview truncated — download the notebook to see the full lesson.