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

TomF tomf.sessile at gmail.com
Wed Mar 31 19:21:36 CEST 2010


On 2010-03-31 00:57:51 -0700, Peter Otten <__peter__ at web.de> said:
> Pierre Quentel wrote:
> 
>> I'm surprised nobody proposed a solution with itertools ;-)
> 
> next(itertools.takewhile(lambda _: a == b, ["yes"]), "no")
> 
> You spoke to soon :)

I salute you, sir, for upholding the standards of this group.

-Tom




More information about the Python-list mailing list