User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 374,148 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,461 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:

"choose" in Python?

Join Date: May 2008
Location: Toronto
Posts: 37
Reputation: kdoiron is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
kdoiron's Avatar
kdoiron kdoiron is offline Offline
Light Poster

Re: "choose" in Python?

  #7  
May 12th, 2008
I'm going to feel really stupid when I see the answer to my question, because I'm sure I've seen it before and I've just forgotten. Anyway, I was just fiddling with this example, and I can't remember how to add a default case. In the example given I want to return the text "Bad input" for any value other than 1, 2, or 3. What do I need to add to the dictionary?
But I don't like SPAM!
Reply With Quote  
All times are GMT -4. The time now is 3:22 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC