List (listing) features detailed

Source: Internet
Author: User
Tags iterable

Class List (object):
"""
List (), New empty list
List (iterable), new list initialized from iterable ' s items
"""
def append (self, p_object): # Real signature unknown; Restored from __doc__
"" "L.append (object)--Append object to End" ""
Pass
a=[' abs ', ' ads ', ' APS ',]
b=[' abs ', ' ads ', ' APS ',]
Print (List.append (A, ' AFS '))
Print (a)
[' ABS ', ' ads ', ' APS ', ' AFS '] add this field to the end of the list

def count (self, value): # Real signature unknown; Restored from __doc__
"" "L.count (value), integer--return number of occurrences of value" ""
return 0
b=[' abs ', ' ads ', ' APS ',]
Print (List.count (b, ' abs '))
1 Statistics The total number of fields in the occurrence list

def extend (self, iterable): # Real signature unknown; Restored from __doc__
"" "L.extend (iterable)--extend list by appending elements from the iterable" ""
Pass
a=[' abs ', ' ads ', ' APS ',]
b=[' abs ', ' ads ', ' APS ',]
Print (List.extend (A, B))
Print (a)
[' ABS ', ' ads ', ' APS ', ' ABS ', ' ads ', ' APS ']
Extended List

def index (self, value, Start=none, Stop=none): # 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
View List Index

def insert (self, Index, p_object): # Real signature unknown; Restored from __doc__
"" "L.insert (Index, object)--Insert object before index" "
Pass
Inserts a field into the list at the specified index location

def pop (self, index=none): # 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
Delete an index field

def remove (self, value): # Real signature unknown; Restored from __doc__
"""
L.remove (value)--Remove first occurrence of value.
Raises valueerror if the value is not present.
"""
Pass
Remove a field

def reverse (self): # real signature unknown; Restored from __doc__
"" "L.reverse ()--Reverse *in place*" ""
Pass
Reverse Sort

def sort (self, cmp=none, Key=none, Reverse=false): # 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
Sort

def __add__ (self, y): # Real signature unknown; Restored from __doc__
"" "X.__add__ (y) <==> x+y" ""
Pass
Add to

def __contains__ (self, y): # Real signature unknown; Restored from __doc__
"" "X.__contains__ (y) <==> y in X" ""
Pass
is in the list

def __delitem__ (self, y): # Real signature unknown; Restored from __doc__
"" "x.__delitem__ (y) <==> del x[y]" ""
Pass
b=[' abs ', ' ads ', ' APS ',]
Print (list.__delitem__ (b,0))
Print (b) [' Ads ', ' APS '] cut the specified index field

‘‘‘
def __delslice__ (self, I, j): # 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): # Real signature unknown; Restored from __doc__
"" "X.__eq__ (y) <==> x==y" ""
Pass
a=[' abs ', ' ads ', ' APS ',]
b=[' abs ', ' ads ', ' APS ',]
Print (list.__eq__ (A, B))
True
Two lists are the same
def __getattribute__ (self, name): # real signature unknown; Restored from __doc__
"" "x.__getattribute__ (' name ') <==> x.name" ""
Pass
Recovery structure

def __getitem__ (self, y): # Real signature unknown; Restored from __doc__
"" "x.__getitem__ (y) <==> x[y]" ""
Pass
b=[' abs ', ' ads ', ' APS ',]
Print (list.__getitem__ (b,1,))
The field of the index position in the ADS query list
‘‘‘
def __getslice__ (self, I, j): # 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): # Real signature unknown; Restored from __doc__
"" "x.__ge__ (y) <==> x>=y" ""
Pass
a=[' abs ', ' ads ', ' APS ',]
b=[' abs ', ' ads ', ' APS ',]
Print (list.__ge__ (A, B))
True
Greater than or equal

def __gt__ (self, y): # Real signature unknown; Restored from __doc__
"" "X.__gt__ (y) <==> x>y" ""
Pass
Greater than
def __iadd__ (self, y): # Real signature unknown; Restored from __doc__
"" "X.__iadd__ (y) <==> x+=y" ""
Pass
a=[' abs ', ' ads ', ' APS ',]
b=[' abs ', ' ads ', ' APS ',]
Print (list.__iadd__ (b,a))
[' ABS ', ' ads ', ' APS ', ' ABS ', ' ads ', ' APS '] are added

def __imul__ (self, y): # Real signature unknown; Restored from __doc__
"" "X.__imul__ (y) <==> x*=y" ""
Pass
Generate field * Multiples in list

def __init__ (self, seq= ()): # Known special case of list.__init__
"""
List (), New empty list
List (iterable), new list initialized from iterable ' s items
# (copied from class Doc)
"""
Pass
Print (list.__init__ (A, ' AGS ',))
Print (a) Generate a new list [' A ', ' G ', ' s ']

def __iter__ (self): # real signature unknown; Restored from __doc__
"" "x.__iter__ () <==> iter (x)" ""
Pass
b=[' abs ', ' ads ', ' APS ',]
Print (list.__iter__ (b))
<list_iterator object at 0x000000000118dd30> display 16 binary
def __len__ (self): # real signature unknown; Restored from __doc__
"" "x.__len__ () <==> len (x)" ""
Pass
Print (list.__len__ (b))
3 Display length

def __le__ (self, y): # Real signature unknown; Restored from __doc__
"" "x.__le__ (y) <==> x<=y" ""
Less than or equal
def __lt__ (self, y): # Real signature unknown; Restored from __doc__
"" "X.__lt__ (y) <==> x<y" ""
Pass
Less than
def __mul__ (self, n): # real signature unknown; Restored from __doc__
"" "X.__mul__ (n) <==> x*n" ""
Pass
b=[' abs ', ' ads ', ' APS ',]
Print (list.__mul__ (b,2))
Print (b) [' ABS ', ' ads ', ' APS ', ' ABS ', ' ads ', ' APS '] Multiplier

@staticmethod # known case of __new__
def __new__ (S, *more): # Real signature unknown; Restored from __doc__
"" "T.__new__ (S, ...) A new object with type S, a subtype of T "" "
Pass

def __ne__ (self, y): # Real signature unknown; Restored from __doc__
"" "x.__ne__ (y) <==> x!=y" ""
Pass
is not equal

def __repr__ (self): # real signature unknown; Restored from __doc__
"" "x.__repr__ () <==> repr (x)" ""
Pass
Recovery structure

def __reversed__ (self): # real signature unknown; Restored from __doc__
"" "l.__reversed__ ()--return a reverse iterator over the list" "
Pass
Show 16 binary

def __rmul__ (self, n): # real signature unknown; Restored from __doc__
"" "X.__rmul__ (n) <==> n*x" ""
Pass
Multiply list fields from left to right multiples

def __setitem__ (self, I, y): # Real signature unknown; Restored from __doc__
"" "x.__setitem__ (i, y) <==> x[i]=y" ""
Pass

‘‘‘
def __setslice__ (self, I, J, y): # 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): # real signature unknown; Restored from __doc__
"" "l.__sizeof__ ()--size of L in memory, in bytes" ""
Pass

__hash__ = None list takes up the number of bytes

List

List (listing) features detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.