Input again (!!@#&#$^@#$)

Emile van Sebille emile at fenx.com
Fri Jul 12 13:35:31 EDT 2002


Seth Ainsley
> Input again.  Thanks for the answer on what I thought was raw.input
(but was actually raw_input), but how would it be for me to get
something like the following to work:
> input = raw_input('What's your answer? ')

You're mixing your single quotes.  Try:
input = raw_input("What's your answer? ")

> if input = "Yes" then print "Something"

Python doesn't have in-line assignment or a then.  This s/b:
 if input == "Yes": print "Something"

> else print "Something else"

else: print "Something else"

Go to the newbies page at http://python.org/doc/Newbies.html and work
through the tutorial at http://python.org/doc/current/tut/tut.html.  It
looks like you're trying to write in basic, not python.

HTH


--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list