match and case
Also written: case, match, match statement
A tidy alternative to a long `if`/`elif` chain, available in Python 3.10 and later. Each `case` names one value to match, and `case _:` catches everything else.
Also written: case, match, match statement
A tidy alternative to a long `if`/`elif` chain, available in Python 3.10 and later. Each `case` names one value to match, and `case _:` catches everything else.