Python If statement and logical operator issue [duplicate]
问题 This question already has answers here : How to test multiple variables against a value? (24 answers) Closed 2 years ago . I'm trying to create a small python program to emulate rolling a single die. My problem arises in that I want the program to accept both upper and lower-case 'Y' to trigger a re-roll. My program works when I accept either upper or lower case y but when I try to change the line if usr == 'Y' to if usr == 'Y' or 'y' creates a problem where it never enters the else statement