Please explain why Python does not have the switch-case feature implemented in it.
def f(x): return { 1 : 'output for case 1', 2 : 'output for case 2', 3 : 'output for case 3' }.get(x, 'default case')
You can use this as switch case in python and if condition not match it will return default if condition not match