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.

  • Twitter
  • StumbleUpon
  • Reddit
  • Digg
  • del.icio.us
  • Technorati
  • Facebook

Related posts:

Magnus’s Python Page
Dive Into Python
Darkside Switch Campaign
Tao: How to Switch to the Mac
theKompany Black Adder Python IDE Review

Hope you like that post!

Forever Geek is a resource for all things geek. You can stay tuned by having the latest FG news delivered to you for free via RSS.