Day 07 Collection and depth copy

file operation outline: Read mode: *r read read(n) readline() readlines() for loop best rb *r+ r+b write mode: *ww: no file , create a file to write content. w: If there is a file, empty the original file and write new content. Wb w+ w+b Append mode *aa: No file, create file to write in

Data type supplement: lst = ["依天屠龙记", "诛仙", "see", "Kite-seeker"] clear () lst.clear() print(lst) # problem for i in lst: lst.remove(i) print(lst) for i in lst:# for meaning here is record deletion