list.clear() missing?!?

Fredrik Lundh fredrik at pythonware.com
Thu Apr 13 11:47:11 EDT 2006


Mel Wilson wrote:

> > for item in seq:
> >     L.append(item)
>
> Both extend and append have one-line slice equivalents,
> except that the equivalents have to keep referring to
> the length of the list.. (have to keep finding the
> len function.)

fwiw, the *tutorial* defines append and extend in terms of slicing...

</F>






More information about the Python-list mailing list