Skip to content

Instantly share code, notes, and snippets.

@jumbojet
jumbojet / switch.py
Created February 8, 2015 19:55
switch case in python
'''Using the if else construct '''
def function_if_else(condtion_variable):
if condtion_variable = -1:
print "Variable is equal to minus 1"
elif condtion_variable == 0:
print "Variable is equal to 0"
else condtion_variable =1:
print "Variable is equal to 1"
'''We can use dictionary '''