What's the proper way to write this code? y/n returns 'typed something else print("Player died") restart = input('Restart? y/n') if restart in ['y', 'n']: if restart == 'y': print('Restart is y') if restart == 'n': print('Restart is n') while restart != 'y' or 'n': print('typed something else other than y/n') restart = input('Restart? y/n') if restart in ['y', 'n']: if restart == 'y': print('Restart is y') break if restart == 'n': print('Restart is n') break
3/31/2020 3:05:24 AM
sudo-asap2 Answers
New AnswerSololearn Inc.
535 Mission Street, Suite 1591Send us a message