Answers for "switch case dictionary python"

0

switch case dictionary python

result = {
  'a': lambda x: x * 5,
  'b': lambda x: x + 7,
  'c': lambda x: x - 2
}[value](x)
Posted by: Guest on July-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language