[英] Stop while loop if user inputs correct operator
I just started learning Python yesterday and one of the programs I'm trying to write is a calculator. This segment of code is where I'm having problems. The while loop is supposed to stop when the user inputs any of the math operators but it still asks for input even when the user enters one the correct characters.
What do I need to do to fix this.
op = None while (op != "-" or op != "+" or op != "*" or op != "/"): op = input("Enter operator (-, +, *, /): ") print(op)