186k views
3 votes
How many types of switch cases are there in total?
(Python)

User Mokkun
by
4.2k points

1 Answer

2 votes

Answer:

Python does not have a switch or case statement.

Instead we use;

the dictionary data type functions as cases in a switch statement

the if-else statement

the class statement

Python 3.10 and later will allow using match instead of switch

User Jellobird
by
4.5k points