The python way is to use a dictionary, or in simpler cases, if statements.
Your example falls short because case statements aren't such an obvious method of solving the problem as you think. They are nothing more than an artifact of the machine that C pushes up to you.