Articles
The problem...
You know how to match exact values. But sometimes a value alone isn't enough.
You need to match a range. A condition. Not just "is it this?" — but "is it th…
The problem...
A vending machine has one job. You pick a product. You insert money. It tells you the price, confirms the purchase, and gives you your change.
Simple logic. Multi…
The problem...
Your match block runs the wrong case. Or no case at all. Or it crashes on Python 3.9.
These are the mistakes almost every beginner makes with match / case. At lea…
The idea!
You've covered match / case, guards, and pattern matching.
This is your reference. Everything in one place.
Come back here whenever you need a reminder.
match / case…
The problem...
You need to loop through something. And for every item — loop through something else.
A table. A grid. Every combination of two sequences. One loop can't do…
The problem...
You've seen for alone. You've seen if alone. You've even seen them together — briefly.
But in nested loops, the combination becomes essential. You're not ju…