I thought I understood Python slicing operations, but when I tried to update a sliced list, I got confused:
>>> foo = [1, 2, 3, 4] >>> foo[:1]
foo[:] is a copy of foo. You mutated the copy.
foo[:]
foo