"Temporary" Variable

darthbob88 at gmail.com darthbob88 at gmail.com
Wed Feb 22 22:31:12 EST 2006


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. If this is in the FAQ,
my apologies, I did not find it. Thank you in advance.




More information about the Python-list mailing list