Switch statements in Python


 

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.


 

0 Responses to Switch statements in Python

  1. Sindhu says:

    this sux :(

  2. nobody says:

    do you think you could fit in a few more ads on this page?

  3. John says:

    what a stupid page for basic functionality that python lacks.

Leave a Comment

Your email address will not be published.

*