In Python, I am writing a program that allows the user to encrypt messages that they input. There are two methods of encryption that they can select, and I am trying to create a while loop that will trigger if the user chooses an option that is not equal to the two options, 1 and 2.
option1 = input('Which encryption method would you like to use? 1 = Across (NOPQ ...) and 2 = Backwards (ZYXW ...)')
while option1 != [1, 2]:
print 'Please type 1 or 2.'
option1 = input()
If I write this, than I will be asked to input 1
or 2
no matter what I type.