Is there a better algorithm?

Andreas Waldenburger geekmail at usenot.de
Fri Jan 2 14:27:41 EST 2009


On Fri, 02 Jan 2009 19:55:43 +0100 Markus Brueckner <news at slash-me.net>
wrote:

> g = ( ((e[0],None,e[1]) if len(e)==2 else (e[0],e[1],e[2])) for e in
> L)

If this isn't proof of Python's versatility, I don't know what is. In
one line it can mimic both Lisp and Perl. Sweet.

:)
/W

-- 
My real email address is constructed by swapping the domain with the
recipient (local part).



More information about the Python-list mailing list