Hi;<br>I have the following:<br><br>style = raw_input('What style is this? (1 = short, 2 = long): ')<br>flag = 0<br>while flag == 0:<br> if (style != 1) or (style != 2):<br> style = raw_input('There was a mistake. What style is this? (1 = short, 2 = long): ')<br>
else:<br> flag = 1<br><br>I would think this would catch errors and permit valid values, but it doesn't. If I enter an erroneous value the first time, and the second time a good value, it doesn't break the loop. Why?<br>
TIA,<br>Victor<br>