我要求用户提供输入,并想检查他是否使用正确的字母继续,我已经写了这段代码,但即使我写了#34; y"或" n",它没有退出循环,我不明白为什么:
while True:
start = input("Want to start? (Y/n) ").lower()
if start != 'y' or 'n':
print("letter not accepted! Please write 'Y' to start or 'N' to exit!\n")
else:
break
if start == "y":
separate(players)
else:
print("Goodbye!")