1# Here is one way to implement a switch construct
2# Switcher is a dictionary data type here
3def week(i):
4 switcher={
5 0:'Sunday',
6 1:'Monday',
7 2:'Tuesday',
8 3:'Wednesday',
9 4:'Thursday',
10 5:'Friday',
11 6:'Saturday'
12 }
13 return switcher.get(i,"Invalid day of week")
14
15print(week(5)) # Call the function