Skip to content
Back to Python

Python

Structural pattern matching

Select a case by matching a value's contents and structure.

With Zoonk, your plan starts at this chapter and fits your schedule.

Build my plan

Start free, no account needed.

Where this chapter sits in the course

Lessons

Chapter 11 of 22 · 6 short lessons · 22 min
  1. 1Match statements and literal patterns3 min
  2. 2OR and wildcard patterns3 min
  3. 3Sequence patterns and captures4 min
  4. 4Mapping patterns3 min
  5. 5Pattern guards3 min
  6. 6Challenge: Structural pattern matching6 min

What you'll learn

  • Select cases using literal and structural patterns
  • Capture matched values and apply guards

Your plan from this chapter

It follows the course from here, at your pace, with reviews before you forget.

Build my plan

Start free, no account needed.