I need python to keep asking the raw_input if the answer is different from 1 or 2.
Here the example:
print """What do you want me to do?
1) Press 1 if you want to .....
2) Press 2 if you want to ....."""
while True:
answer1 = raw_input(" => ")
if (answer1 == 1):
....
....
elif (answer1 == 2):
....
....
elif (answer1 != 1 or 2) or answer1.isalpha():
print "I need 1 or 2"
The problem is that python is keeping asking the raw_input also if the user enter 1 or 2. Where am I wrong?