list.clear() missing?!?

Fredrik Lundh fredrik at pythonware.com
Thu Apr 13 03:08:08 EDT 2006


Peter Hansen wrote:

> > * learning slices is basic to the language (this lesson shouldn't be
> > skipped)
>
> And yet it doesn't appear to be in the tutorial.

oh, please.

slices are explained in the section on strings, and in the section on lists,
and used to define the behaviour of the list methods in the second section
on lists, ...

> I could have missed it, but I've looked in a number of the obvious places

http://docs.python.org/tut/node5.html#SECTION005140000000000000000

section 3.1.2 contains an example that shows to remove stuff from a list,
in place.

if you want a clearer example, please consider donating some of your time
to the pytut wiki:

    http://pytut.infogami.com/

</F>






More information about the Python-list mailing list