python swithc statment code example Example: swtich statement python def f(x): return { 'a': 1, 'b': 2, }[x]