List lists are an ordered set of elements that can be added and removed at any time, l=[] The index starts at 0, the index of the first element is 0, the second is 1, the penultimate is-1, the second-to-last is-2, and so on, using the index, do not cross-border append () Always add new elements to the end of list, write L.append () insert () accepts two parameters, one is the index number, and the second is the new element to be added. L.insert (0, ' Paul '), ' Paul ' will be added to the first, originally 0 and later elements, all automatically move backwards one bit, or direct d[] pop () always delete the last element of the list, L.pop (2) Delete the element of index 2 l[2]= ' Paul ' , directly replacing the element of index 2 tuple is another ordered list, called a tuple, similar to list, but once the tuple is created, it cannot be modified. t= () Add a comma when you create a tuple of cells
List and tuple types