(a==b) ? 'Yes' : 'No'

Albert van der Horst albert at spenarnc.xs4all.nl
Tue Apr 6 16:16:17 CEST 2010


In article <houv8a$ed9$02$2 at news.t-online.com>,
Peter Otten  <__peter__ at web.de> wrote:
>Pierre Quentel wrote:
>
>> I'm surprised nobody proposed a solution with itertools ;-)
>
>next(itertools.takewhile(lambda _: a == b, ["yes"]), "no")

I could learn something here, if you explain it?

>
>You spoke to soon :)
>
>Peter

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert at spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst




More information about the Python-list mailing list