On Mon, Oct 13, 2014 at 6:16 AM, Marko Rauhamaa <ma...@pacujo.net> wrote:
> The corrected version
>
>     while ans.lower() != 'yes' and ans.lower()[0] != 'y':
>          ans = input('Do you like python?')
>
> is equivalent with
>
>     while ans.lower()[0] != 'y':

It's true that the first part is redundant, but trimming that out
wouldn't have taught the OP about boolean logic :)

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

Reply via email to