[EMAIL PROTECTED] wrote in news:1140725159.143882.202630 @j33g2000cwa.googlegroups.com:
> > Steven D'Aprano wrote: >> You could try this: >> >> while 1: >> var = raw_input("Give me some data! ") >> if var == "some data": >> print "Success!" >> break >> else: >> print "No good, try again." > That works fine with strings and when "some_data" is hardcoded. I run > into trouble when "some data" is replaced with a number, unquoted. It > simply says "No good, etc" Raw_input isn't giving you what you think it is. You're comparing it to an integer, not a string. Does that help? -- http://mail.python.org/mailman/listinfo/python-list