i'm trying to make sure the user enters either 1 or 2 when asked for input, and if the input is not a digit, or it is a digit but not 1 or 2, then it will keep asking them for the input until they enter one that meets my requirements. I currently have this but can't seem to get it to work. What am I doing wrong and any suggestions on fixing it? Thanks
option1 = input("Path 1 or Path 2(enter 1 or 2): ")
while (not option1.isdigit() and int(option1) != 1 or int(option1) != 2):
print('Sorry, only the integer 1 or 2 is allowed. Try again. ')
option1 = input("Path 1 or Path 2(enter 1 or 2): ")