Describes how to work with lists, including create, access, update, delete, other actions, and more
Create a list: just enclose the comma-delimited data items in square brackets.
Accessing the values in the table
Value exceeds index error, slice exceeds index no error
Update list: The data in the list can be modified or updated, or you can use the Append () method to add list items
Use the Append () function to add
Delete list Element del ()
List script operator Len (), ' + '
Iteration
Whether to include judgment
Slice reverse output
List operation function Len () CMP (List1, LIST2) max (list) min list (seq): Convert tuples to lists
Count (object): Counts the number of occurrences of an element in a list
Index (object): Find the index position of the first occurrence of a value from the list
Remove (object) Removes the first occurrence of a value in the list
Insert (Index, object) Inserts an object into a position in the list
Pop (index): Removes an element from a location in the table, without writing the default last
Extend (SEQ): Appends multiple values of another sequence at the end of a class table
Reverse (): Reverse List of elements
Sort ([func]): Sort the original list
Copy () replication creates a new memory space
Clear (): Empty list
Common actions for Python lists