[EMAIL PROTECTED] wrote: > Problem: I wish to run an infinite loop and initialize a variable on > each iteration. Sort of like, "Enter Data", test it, "No good!", "Next > Try?", test it, etc. What I've tried is simply while 1: var1 = > raw_input, test var1, then run through the loop again. What results is > var1 gets and keeps the first value it receives.
Hmmm. I get a syntax error. >>> while 1: ... var1 = raw_input ... test var1 File "<stdin>", line 3 test var1 ^ SyntaxError: invalid syntax How about posting your actual code? 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." -- Steven. -- http://mail.python.org/mailman/listinfo/python-list