google, Python, and eleven (was Re: google and Python ;-)

Andrew Dalke dalke at
Sun Sep 23 02:48:15 CEST 2001

Peter Hansen wrote:
>>>> def numerology(s):
>...     f = lambda x, y : x+y
>...     return reduce(f, map(int, str(reduce(f, map(ord, s)))))

Instead of making a new lambda function, use operator.add.


                    dalke at

More information about the Python-list mailing list