Xavier Ho wrote:
On Wed, Jul 29, 2009 at 8:52 PM, MRAB <pyt...@mrabarnett.plus.com <mailto:pyt...@mrabarnett.plus.com>> wrote:Slightly shorter: print '\n'.join("%s - %s" % p for p in enumerate(nomi)) :-)That's cool. Does that make the "list" a tuple? (not that it matters, I'm just curious!)
I've just replaced the list comprehension with a generator expression. -- http://mail.python.org/mailman/listinfo/python-list