从代码中可以看出它是不言自明的,但我想检查输入是否不等于这些值而不是再次询问。我认为这会起作用,但它不起作用而且它有故障,有什么更好的方法来做到这一点?
type=input("Please choose an option: ")
while type.isalpha() == False:
type=input("Please choose an option: ")
while type != ("a" and "A" and "b" and "B" and "c" or "C"):
type=input("Please choose an option: ")