Is there a better algorithm?

Andreas Waldenburger geekmail at
Fri Jan 2 20:27:41 CET 2009

On Fri, 02 Jan 2009 19:55:43 +0100 Markus Brueckner <news at>

> 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.


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

More information about the Python-list mailing list