First, List parsing
[I * 2 for i in [8,-2, 5]]--[16,-4, 10]
Ii.. Built-in functions
List.append (obj) adds an object to the list obj
List.count (obj) returns the number of times an object obj appears in the list
List.extend (SEQ) adds the contents of the sequence SEQ to the list
List.index (obj, I=0,j=len (list)) returns the K value of list[k] = = obj, and the range of K throws a ValueError exception in i<=k<j; otherwise.
List.insert (index, OBJ) inserts the object obj at the index position.
List.pop (index=-1) deletes and returns the object at the specified position, which is the last object by default
List.remove (obj) removes an object from the list obj
List.reverse () flip list in place
List.sort (Func=none,key=none,reverse=false) sorts the members in the list in the specified manner, if the Func and key parameters are specified, the individual elements are compared in the specified manner, and if the reverse flag is set to True, The list is ordered in reverse order.
Python basic notes-sequence of data types (2)