Tuples
OHLC bars, RGB, GPS, atomic constants; unpack, swap, tuple-keyed dicts, grids.
Lesson 13 · Tuples — Level II · Guide
August 13, 2026 · Bridge Academy Python Program
Learning goals
- Model fixed records (OHLC stock bars, RGB colors, GPS coordinates) with tuples. - Index, slice, and unpack tuples into named components. - Use immutability to protect scientific and financial constants. - Combine tuples with lists and dictionaries in real record structures. - Swap values cleanly with a, b = b, a without a temporary variable. - Use tuple methods .count(), .index(), concat +, and repeat *.
This lesson covers PCEP-30-02 objective 3.2.
Preview truncated — download the notebook to see the full lesson.