foo = [1, 2, 3, 4] foo[0:2] = [0] foo -> [0, 3, 4] del foo[0:1] foo -> [3, 4]
del foo[:] foo -> []
And del is identical to assigning to [].
>>> foo = [0, 1, 2] >>> foo[0:1] = [] >>> foo [1, 2]
-----