We take a list of element types as an example, and we do the deletion of the listing elements:
>>> L = [' No surfing ', ' flippers ']
Law I: Remove (val)
>>> l.remove (' no surfing ')
>>> l
[' flippers ']
(1) The parameter of remove () is a specific element value, not an index,
(2) If you know the index, how to remove the element values on the index using remove,
>>> L.remove (l[1])
This is a great risk because list allows duplicates, remove () deletes the first and the parameter values equal to the element method two: Pop (0)
(1) Pop () receives the index, without the parameter deletion is the last element (typical stack characteristics )
(2) a pop () has a return value that returns the deleted element value
L.pop () <==> L.pop (-1)
(3) The Append () (added to the tail) of the list, pop () (ejected from the tail), succeeded in turning the list into stack method three: Del (l[0])
>>> del (l[0])