noob question Letters in words?

Ivan Shevanski darkpaladin79 at hotmail.com
Fri Oct 7 20:46:39 EDT 2005


Alright heres another noob question for everyone.  Alright, say I have a 
menu like this.

print "1. . .Start"
print "2. . .End"
choice1 = raw_input("> ")

and then I had this to determine what option.


if choice1 in ('1', 'Start', 'start'):
    #do first option
if choice1 in ('2', 'End', 'end'):
    #do second option

Is there a way (I searched for a module but didnt find one) that I can do 
something like this?

if choice1 in ('1', 'S', 's'):
    #do first option
if choice1 in ('2', 'E', 'e'):
    #do second option


For instance I could type in Stop and would get the first option since it 
had an "s" in it?
Anyone heard of any way to do this?

Thanks,
-Ivan



By the way, if anyone gets tired of my persistant noob questions please tell 
me I don't want to bother anyone =D

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the Python-list mailing list