while loop - multiple condition

giacomo boffi pecore at pascolo.net
Tue Oct 14 19:04:42 EDT 2014


Tim Chase <python.list at tim.thechases.com> writes:

> On 2014-10-12 22:16, Marko Rauhamaa wrote:
>> is equivalent with
>> 
>>     while ans.lower()[0] != 'y':
>>          ans = input('Do you like python?')
>
> And still better improved with
>
>   while ans[:1].lower() != 'y':
>     ans = input('Do you like python?')

 yok is Turkish for an EMPHATIC NO
(or, at least, that's what I was led to think many years ago)



More information about the Python-list mailing list