Why is the second part of while condition not being checked? while ans.lower() != 'yes' or ans.lower() != 'y': ans = input('Do you like python?') My intention is if either of the conditions are true the loop should break. But the condition after 'or' doesn't seem to evaluate. Thanks, Shiva.