+ 1
Python have switch or not??
4 ответов
+ 9
No Because there is no need of it. Most languages have switch-case because they don't have proper mapping constructs. You cannot map a value to a function, that's why they have it. But in Python, you can easily have a mapping table(dict) where a certain value maps to a certain function.
+ 2
The replacements in python are if/elif/else. You can also use a dictionary as an equivalent.
+ 2
no se que tratas de decir :v
+ 1
do you speak uzbekian