switch case dictionary python

Solutions on MaxInterview for switch case dictionary python by the best coders in the world

showing results for - "switch case dictionary python"
Malcolm
28 Feb 2017
1result = {
2  'a': lambda x: x * 5,
3  'b': lambda x: x + 7,
4  'c': lambda x: x - 2
5}[value](x)