On Mon, Oct 13, 2014 at 4:08 AM, Shiva
<shivaji...@yahoo.com.dmarc.invalid> wrote:
> Why is the second part of while condition not being checked?
>
> while ans.lower() != 'yes' or ans.lower()[0] != '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.

The loop will continue while either part is true - that's what "or"
means. Is that what you intended it to be doing?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to