Pierre Quentel wrote: > I'm surprised nobody proposed a solution with itertools ;-)
next(itertools.takewhile(lambda _: a == b, ["yes"]), "no") You spoke to soon :) Peter -- http://mail.python.org/mailman/listinfo/python-list
Pierre Quentel wrote: > I'm surprised nobody proposed a solution with itertools ;-)
next(itertools.takewhile(lambda _: a == b, ["yes"]), "no") You spoke to soon :) Peter -- http://mail.python.org/mailman/listinfo/python-list