List: Lists, data types can be different
Definition: (example) classmates = [' Michael ', ' Bob ', ' Tracy ']
Access to an element: (example) classmates[0] means access to the first element (example) classmates[-1] means access to the last element
Get list Length: (example) Len (classmates)
Append elements: (example) classmates.append (' Adam ')
Insert element to specified position: (example) Classmates.insert (1, ' Jack ')
Delete End element: (example) Classmates.pop ()
Delete the specified element: (example) Classmates.pop (1)
Replace the specified element: (example) classmates[1] = ' Sarah '
Two-dimensional list: (example) p = [' asp ', ' php ']
s = [' Python ', ' Java ', p, ' scheme ']
S[2][1] is ' php '
Tuple: Tuples, once initialized cannot be modified
Define an empty tuple: (example) T = ()
Define a single element tuple: (example) T = (1,) (in order to differentiate between expressions (1) and tuple (1))
"Mutable" tuple: (example) t = (' A ', ' B ', [' A ', ' B ']) (description: The contents of a tuple are not mutable, but the contents of the list can be changed)
Dict: Dictionary, key-value mapping store, very fast lookup speed
Python Learning: list, tuple, and dict