A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/090939.html below:

In the Absence of a GoTo Statement: Newbie needs menu-launcher to choose amongst sub-programs

In the Absence of a GoTo Statement: Newbie needs menu-launcher to choose amongst sub-programs In the Absence of a GoTo Statement: Newbie needs menu-launcher to choose amongst sub-programsRon Stephens rdsteph at earthlink.net
Fri Apr 13 16:30:57 EDT 2001
Steve offered me this good code:

choice = raw_input("Option: ")
if choice == 1:
    # code for case 1
elif choice == 2:
    # code for case 2
elif choice == 3:
    :
    :
else:
    print "Invalid choice"

Steve, thanks. I guess in this case, when the code for a choice finishes
executing, program flow would go to (Alex: sorry about that particular choice of
words;-))) the end, or right after the print "invalid choice " statement...?


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4