Python lacks a switch statement. Not really a problem when you can use dictionaries and such, but some people may find it quite disconcerting at first. In any case Simon shows you how he accomplishes the task.
Make sure to read the comments for an interesting discussion on what to do in different situations.








this sux :(
do you think you could fit in a few more ads on this page?
what a stupid page for basic functionality that python lacks.