x = input("print data? (Y/N) ")
while (x != 'Y' or x != 'N'):
x = input("error: wrong input. Please put Y or N only ")
if x == 'Y':
read_serial()
Trying to check whether or not the keyboard input (x) is equal to a 'Y' or 'N' string. And if not then the loop continues until it is. However the above code seems to compile and run fine except that no matter what the loop keeps running. Don't have much experience with Python 3 yet so could any one tell me what I'm doing wrong?