+ 4

Can we use switch statement in python?

If not, what other statements we can use instead of switch statement?

1st May 2019, 9:31 AM
k R :)
k R :) - avatar
3 Antworten
+ 3
we can use python dictionary instead of switch statment eg: switcher={ "0":"case 1", "1":"case 2" }
1st May 2019, 9:49 AM
Benson Saju
Benson Saju - avatar
0
See Dictionary
2nd May 2019, 8:17 PM
Cédric Gd
Cédric Gd - avatar