•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 375,229 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 2,251 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:
Views: 329 | Replies: 8
•
•
Join Date: Apr 2008
Posts: 25
Reputation:
Rep Power: 1
Solved Threads: 0
There's a function that repeatedly shows up in languages, usually with more or less the following form (Python syntax):
Or something like that. I've also seen it called "switch." Does Python have anything like this?
Python Syntax (Toggle Plain Text)
var1 = raw_input("Input a number between one and three.") choose var1: case "1": print "You inputted one." case "2": print "You inputted two." case "3": print "You inputted three."
Last edited by FreezeBlink : May 9th, 2008 at 7:59 pm. Reason: Added sentance on "switch"
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
- def save(): print "HOW DO I DO THIS?" (Python)
Other Threads in the Python Forum
- Previous Thread: Pymmlib for Python-BioPython
- Next Thread: urllib problems



Threaded Mode