Bridge Academy.
← BACK TO MATERIALS
WEEK 51 · OCTOBER 15, 2026

Conditional Flow · Part 3

Ternary in comprehensions; match/case with patterns and guards; structural pattern matching preview.

Lesson 21 · Conditional Flow · Part 3 — Level II · Guide

October 15, 2026 · Bridge Academy Python Program

Learning goals

  • Use ternary expressions inside list and dict comprehensions.
  • Write match / case with value, sequence, and mapping patterns.
  • Add guards (case x if cond) to refine a pattern.
  • Preview structural pattern matching on records and tuples.

This lesson covers PCEP-30-02 objective 2.1.

Preview truncated — download the notebook to see the full lesson.