Is this a good use for lambda

Nick Coghlan ncoghlan at
Wed Dec 22 14:17:59 CET 2004

Jeff Shannon wrote:
> Er, not as far as I can tell....  the 2.4 feature was what wouldn't work 
> consistently; the corrected version, using list() and reverse(), doesn't 
> look like it has anything that'll be a problem in my 2.2 installation, 
> and probably not in 2.1 ....

What he said :)

Although if you genuinely prefer a functional programming style, I'd go with 
Terry's answer rather than mine.

(Incidentally, I didn't even know what the reduce trap *was* until Terry 
described it, but the iterative version avoids it automatically)


Nick Coghlan   |   ncoghlan at   |   Brisbane, Australia

More information about the Python-list mailing list