דילוג לתוכן הראשי
0

השיעור הזה זמין כרגע באנגלית.

Pattern matching

When a value can take many shapes, a long elif chain gets messy. The match statement, added in Python 3.10, compares a value against patterns and runs the first one that fits.