Python list functions and methods
The following functions are primarily available in the Python list:
CMP (LIST1,LIST2) compares elements of two lists
The number of Len (list) elements
Max (list) returns the maximum value of a list element
MIN (list) returns the minimum value of the list element
List (seq) converts tuples to lists
---------------------------------I'm a gorgeous split-line------------------------------------------
The following methods are primarily available in the Python list:
List.append (AAA) Appends a new object to the end of the list
List.count (AAA) counts the number of occurrences of an element in a list
List.extend (SEQ) appends multiple values from another sequence at the end of the list (the original list is expanded with a new list)
List.index (AAA) Find the index position of the first occurrence of a value from the list
List.insert (Index, AAA) Inserts an object into the list
List.pop (aaa=list[-1]) removes an element from the list (the last element by default) and returns the value of the element
List.remove (AAA) Removes the first occurrence of a value in a list
List.reverse () reverse list of elements
List.sort ([Eese]) sort the original list
-------------------------------End--------------------------------------------------------
This article is from the "wind of the Crane" blog, please be sure to keep this source http://addam.blog.51cto.com/5041993/1540007