no, it's not "just switch case", its structural pattern matching and that's a big difference. I recommend checking out this great guide about match case
You took that way too literally (my fault because i actually said literally), they behave different but you can do anything with a match case that you could with a switch case and then some, thats all I mean’t. I feel like you are just going for a gotcha moment when the technicalities are kind of irrelevant considering i was making a generalized statement. I will give you points on the fact that I shouldn’t have used “literally” i overuse that word too much.
-3
u/mati-33 May 26 '26
There is no switch case in python
Python's structural pattern maching is far more than switch case seen in other languages
Beginners should master basic if-elif-else first
There will be no improvement to that code if OP will just simply replace if-elif statements with match case