我对python编程比较陌生,无论如何这是一大段代码的一小部分。这似乎导致了问题:
command = input("Command: ")
while command != ("Exit lift" or "Up" or "Down" or "1" or "2" or "3" or "Cycle"):
print("Error: Command entered doesn't match the 'Commands' list, or isn't a possible command at this time! Please try again...")
command = input("Command: ")
print ("Works")
基本上,我测试了这些命令,它只接受“Exit lift”命令,以及“Up”、“Down”、“1”...等。不会工作。
有什么建议么?初学者