1. Correct creation of List objects
Li = List ([1,2,3,4])
Li2 = List ((1,2,3,4))
2.append
result = Li.append (5)
3.clear
result = Li.clear ()
4. Copy---1. Shallow copy, deep copy
Eg: the list assumes that there is a dictionary or a list, a shallow copy refers to a copy only the first layer, the deep copy as the name implies the copy to the bottom.
5.extend--Extensions (list, ganso)
Li = List ([1,2,3,4])
result = Li.extend ([55, 55,])
Print (LI)
6.insert Increase in index location
Li = List ([1,2,3,4])
result = Li.insert (2,33)
Print (LI)
7.pop Remove, return the removed value, remove the last one by default
Li = List ([1,2,3,4])
Resulet = Li.pop (0)
Print (LI)
Print (Resulet)
8.remove Remove---Remove from left to right and return none after removal
Li = List ([1,2,3,4])
Print (LI)
result = Li.remove (1)
Print (LI)
9 reverse reversal, all sequences are reversed
Li = List ([1,2,3,4])
Print (LI)
result = Li.reverse ()
Print (LI)
Learn the following points and practice them in a scene
Python-day3 list Inside Hi method