Switch Statement in Python

There is no keyword as switch in python. But there is easy and pythonic way to write switch statement in python. let say you have function which accept different parameter and take different actions on that example: We can convert this into dictionary and create multiple individual functions or lambda functions as: OR you can... Continue Reading →

Advertisements

Blog at WordPress.com.

Up ↑

%d bloggers like this: