Actually, there is no switch statement in Python but you can write your program using a dictionary that will work as a switch statement.
Example code for you:
# Firstly you can define the number of function blocks as many options you want.
def zero():
print("You have selected option A.\n")
def one():
print("You have selected option B.\n")
def two():
print("You have selected option C.\n")
def three():
print("You have selected option D.\n")
# Now you need to create a map the inputs to the function blocks
options = {0 : zero, 1 : sqr, 4 : sqr, 9 : sqr, 2 : even, 3 : prime, 5 : prime, 7 : prime, }
options[num]() #This statement is for calling your options
To know more about this you can have a look at the following video tutorial:-