Python does not have any switch statement, as many other languages offer it.
Instead, a series of if-else-if blocks can be used, with an if condition for each case of the switch statement.
See more results on Neeva
Summaries from the best pages on the web
Although popular languages like Java and PHP have in-built switch statement, you may be surprised to know that Python language doesn’t have one. As such, you may be tempted to use a series of if-else-if blocks, using an if condition for each case of your switch statement.
How to implement a switch-case statement in Python - JAXenter