Paul Rubin wrote:
> [EMAIL PROTECTED] writes:
> > print sum( ([i]*n for i,n in enumerate(seq)), [])
>
> Wow, I had no idea you could do that.  After all the discussion about
> summing strings, I'm astonished.

Me too ... despite what bearophile said, this is faster than the 2nd
example. Nearly as fast as the original loop :)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to