mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
merge with 3.3
This commit is contained in:
commit
449709272f
1 changed files with 12 additions and 0 deletions
|
|
@ -54,6 +54,12 @@ objects:
|
||||||
will see this notation frequently in the Python Library Reference.)
|
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)
|
.. method:: list.index(x)
|
||||||
:noindex:
|
:noindex:
|
||||||
|
|
||||||
|
|
@ -79,6 +85,12 @@ objects:
|
||||||
Reverse the elements of the list in place.
|
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::
|
An example that uses most of the list methods::
|
||||||
|
|
||||||
>>> a = [66.25, 333, 333, 1, 1234.5]
|
>>> a = [66.25, 333, 333, 1, 1234.5]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue