当输入 NO 或 N 时文件一直在运行,为什么?
while True:
game_choice = input('Do you want to play? ').lower()
if game_choice == 'yes' or 'y':
break
elif game_choice == 'no' or 'n':
sys.exit()
else:
print('Please answer only Yes/y or No/n')
continue