My understanding of the following code is that if user_input does not equal "up" or "down", it should keep looping. But if it does equal "up" or "down", then it changes valid_move to True and stops looping. But no matter what the user input is, it always prints ("Invalid entry") and never gets out of the while loop.
valid_move = False
while not valid_move:
user_input = input("enter up or down")
if user_input != "up" or user_input != "down"):
print("invalid entry")
else:
valid_move = True
print(user_input)
Why is that?