Kaydet (Commit) a12b6820 authored tarafından Georg Brandl's avatar Georg Brandl

Add missing list methods. Found by Leonardo Pereira on docs@.

üst 2070e83f
......@@ -54,6 +54,12 @@ objects:
will see this notation frequently in the Python Library Reference.)
.. method:: list.clear()
:noindex:
Remove all items from the list. Equivalent to ``del a[:]``.
.. method:: list.index(x)
:noindex:
......@@ -79,6 +85,12 @@ objects:
Reverse the elements of the list in place.
.. method:: list.copy()
:noindex:
Return a shallow copy of the list. Equivalent to ``a[:]``.
An example that uses most of the list methods::
>>> a = [66.25, 333, 333, 1, 1234.5]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment