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]
Use
foo[1] = 'two'
and
foo[2:] = ['three', 'four']
and it works.
The answer why is in the comment above (because you're using a copy)