Python · Lesson 3.4 · Pro
One-line ifs and match
Pick between two values in one line, and choose between many cases with match.
In this lesson
- A value-picking if
- Clamping a value
- match: many exact cases
- Choosing the right tool
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.