[Tutor] Unable to get out of loop

Ken G. beachkidken at gmail.com
Fri Feb 26 20:30:19 EST 2016


I have been unable to get out of the following
loop. No matter what I entered, I can not get
get out of the loop. The only way I can stop
the routine is CTRL-C.

If an entry is either 1, 2 or 3, then I should
be able to proceed. I am sure the correct solution
is very simple but I don't see it.

Thanks.

print
side = ""
while side != "0" or side != "1" or side != "2":
     print "\t1 = right arm\t2 = left arm\t0 = exit program"
     print
     side = raw_input("\t")
     print
print
print "\tYou entered", side
print


More information about the Tutor mailing list