Programming without ifs. Challenge one in python.

Sometimes I think about programming without ifs

I have found great blog about it here.

And here is my solution for first challenge implemented in python.