flatten a level one list

Paul Rubin http
Thu Jan 12 04:14:30 EST 2006


Robin Becker <robin at SPAMREMOVEjessikat.fsnet.co.uk> writes:
> >>>>>reduce(operator.add,a)
> ...
> A fast implementation would probably allocate the output list just
> once and then stream the values into place with a simple index.

That's what I hoped "sum" would do, but instead it barfs with a type
error.  So much for duck typing.



More information about the Python-list mailing list