As you said, there isn't built in functionality for switches in Python, however there are a couple of ways to achieve it.
The first approach (not a great solution), would be to simply use if statements:
if x == 0:
print "X is 0\n"
elif x == 1:
print "X is 1\n"
elif x == 2:
print "X is 2r\n"
elif x == 3:
print "X is 3\n"
A second, and much better approach would be to make use of Python's dictionaries as Shrutarshi Basu wrote about on his website. He makes use of Python's dictionaries to match a key and value, similar to the functionality of a switch statement normally. Take a look at this example he provides to get a better idea:
options = {0 : zero,
1 : sqr,
4 : sqr,
9 : sqr,
2 : even,
3 : prime,
5 : prime,
7 : prime,
}
def zero():
print "You typed zero.\n"
def sqr():
print "n is a perfect square\n"
def even():
print "n is an even number\n"
def prime():
print "n is a prime number\n"
It starts by defining all the possible "keys" (values in the dictionary) that the make-shift switch statement would use to trigger the function, and then it defines the functions below based on what "key" (dictionary value) is called.
Once you do that, it's as simple as doing a dictionary lookup:
options[num]()
I highly recommend you read the article that I had linked to as it will help clarify things surrounding Python's switch-case statements, or lack thereof.