Parzibyte's blog

Free knowledge blog: linux, programming, open source, databases, android, frameworks, web and computing in general

Switch in Python

There is no switch statement in Python, but there are equivalents depending on what you want to achieve. The best-known use of switch is to evaluate a value and avoid nesting multiple if statements.

Today I will explain it: how to make an equivalent switch in Python.

(more…)