switch case dictionary python

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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)