list tuple built-in function usage list
The use of tuples is similar to that of a list without introducing
1) def append (self, p_object): Adds a value to the end of the list
# Real Signature Unknown; Restored from __doc__
"" "L.append (object)--Append object to End" ""
Pass
(2
) def count (self, value): Number of occurrences of a value
# Real Signature Unknown; Restored from __doc__
"" "L.count (value), integer--return number of occurrences of value" ""
return 0
(3
) def extend (self, iterable): List of extensions by adding elements
# Real Signature Unknown; Restored from __doc__
"" "L.extend (iterable)--extend list by appending elements from the iterable" ""
Pass
(4
) def index (self, value, Start=none, Stop=none): Returns the first occurrence of a subscript that defines a single
# Real Signature Unknown; Restored from __doc__
"""
L.index (value, [Start, [stop]]), integer-return first index of value.
Raises valueerror if the value is not present.
"""
return 0
(5
) def insert (self, Index, p_object): Specify subscript Insert Element
# Real Signature Unknown; Restored from __doc__
"" "L.insert (Index, object)--Insert object before index" "
Pass
(6
def pop (self, index=none): Deletes and returns the specified subscript value if no subscript is specified for the last return
# Real Signature Unknown; Restored from __doc__
"""
L.pop ([index]), item-Remove and return item at index (default last).
Raises indexerror If list is an empty or index is out of range.
"""
Pass
(7
) def remove (self, value): Removes the specified value from the list first
# Real Signature Unknown; Restored from __doc__
"""
L.remove (value)--Remove first occurrence of value.
Raises valueerror if the value is not present.
"""
Pass
(8
) def reverse (self): Flip
# Real Signature Unknown; Restored from __doc__
"" "L.reverse ()--Reverse *in place*" ""
Pass
(9
) def sort (self, cmp=none, Key=none, Reverse=false): Compare size
Numbers are compared by size
Chinese by Unicode comparison
# Real Signature Unknown; Restored from __doc__
"""
L.sort (Cmp=none, Key=none, Reverse=false)-stable sort *in place*;
CMP (x, y)-1, 0, 1
"""
Pass
(Ten
) def __add__ (self, y): plus
# Real Signature Unknown; Restored from __doc__
"" "X.__add__ (y) <==> x+y" ""
Pass
( One
) def __contains__ (self, y): Contains
# Real Signature Unknown; Restored from __doc__
"" "X.__contains__ (y) <==> y in X" ""
Pass
(
) def __
Delitem
__ (self, y): Delete a single sequence element
# Real Signature Unknown; Restored from __doc__
"" "x.__delitem__ (y) <==> del x[y]" ""
Pass
( in
) def __
Delslice
__ (self, I, j): Delete sequence fragment
# Real Signature Unknown; Restored from __doc__
"""
X.__delslice__ (i, J) <==> del X[i:j]
Use of negative indices are not supported.
"""
Pass
(
) def __eq__ (self, y): Equals
# Real Signature Unknown; Restored from __doc__
"" "X.__eq__ (y) <==> x==y" ""
Pass
(
) def __
getattribute
__ (self, name): take attribute; built-in getattr (); always called
# Real Signature Unknown; Restored from __doc__
"" "x.__getattribute__ (' name ') <==> x.name" ""
Pass
(
) def __
GetItem
__ (self, y): Get a single sequence element
# Real Signature Unknown; Restored from __doc__
"" "x.__getitem__ (y) <==> x[y]" ""
Pass
( +
) def __
Getslice
__ (self, I, j): Get sequence fragment
# Real Signature Unknown; Restored from __doc__
"""
X.__getslice__ (i, J) <==> X[i:j]
Use of negative indices are not supported.
"""
Pass
(
) def __ge__ (self, y): greater than or equal to
# Real Signature Unknown; Restored from __doc__
"" "x.__ge__ (y) <==> x>=y" ""
Pass
( +
) def __gt__ (self, y): Greater than
# Real Signature Unknown; Restored from __doc__
"" "X.__gt__ (y) <==> x>y" ""
Pass
(
) def __
Iadd
__ (self, y):
# Real Signature Unknown; Restored from __doc__
"" "X.__iadd__ (y) <==> x+=y" ""
Pass
(
) def __
Imul
__ (self, y):
# Real Signature Unknown; Restored from __doc__
"" "X.__imul__ (y) <==> x*=y" ""
Pass
(
) def __
Init
__ (self, seq= ()): The _init__ method runs immediately when an object of the class is established
# known special case of list.__init__
"""
List (), New empty list
List (iterable), new list initialized from iterable ' s items
# (copied from class Doc)
"""
Pass
( at
) def __
ITER
__ (self): Create an iterative class; built-in ITER ()
# Real Signature Unknown; Restored from __doc__
"" "x.__iter__ () <==> iter (x)" ""
Pass
(
) def __
Len
__ (self): length of the number of items in the sequence
# Real Signature Unknown; Restored from __doc__
"" "x.__len__ () <==> len (x)" ""
Pass
( +
) def __le__ (self, y): less than or equal to
# Real Signature Unknown; Restored from __doc__
"" "x.__le__ (y) <==> x<=y" ""
Pass
( +
) def __lt__ (self, y): less than
# Real Signature Unknown; Restored from __doc__
"" "X.__lt__ (y) <==> x<y" ""
Pass
(
) def __
Mul
__ (self, N): repeat; * Operate typeface multiply
# Real Signature Unknown; Restored from __doc__
"" "X.__mul__ (n) <==> x*n" ""
Pass
@staticmethod # known case of __new__
(
) def __
New
__ (S, *more) constructor (with some optional parameters), usually used to set subclasses of the invariant data type.
: # Real Signature unknown; Restored from __doc__
"" "T.__new__ (S, ...) A new object with type S, a subtype of T "" "
Pass
(
) def __ne__ (self, y): Not Equal to
# Real Signature Unknown; Restored from __doc__
"" "x.__ne__ (y) <==> x!=y" ""
Pass
( in
) def __repr__ (self): machine friendly
Real signature unknown; Restored from __doc__
"" "x.__repr__ () <==> repr (x)" ""
Pass
( to
) def __
Reversed
__ (self): takes a sequence as a parameter and returns an iterator that is accessed in reverse order (PEP 322)
# Real Signature Unknown; Restored from __doc__
"" "l.__reversed__ ()--return a reverse iterator over the list" "
Pass
( +
) def __
Rmul
__ (self, N): Reverse multiplication
# Real Signature Unknown; Restored from __doc__
"" "X.__rmul__ (n) <==> n*x" ""
Pass
( as
) def __
SetItem
__ (self, I, y): sets a single sequence element
# Real Signature Unknown; Restored from __doc__
"" "x.__setitem__ (i, y) <==> x[i]=y" ""
Pass
(
) def __
Setslice
__ (self, I, J, y): Set sequence fragment
# Real Signature Unknown; Restored from __doc__
"""
X.__setslice__ (i, J, y) <==> x[i:j]=y
Use of negative indices are not supported.
"""
Pass
(
) def __
sizeof
__ (self): view memory-consuming functions
# Real Signature Unknown; Restored from __doc__
"" "l.__sizeof__ ()--size of L in memory, in bytes" ""
Pass
__hash__ = None
List
Python's Path to growth second (2) _ list tuple built-in function usage