If I do this:
p=list(range(10))
p[2:6:1]=['a','b']
I get p=[0, 1, 'a', 'b', 6, 7, 8, 9] which means Python is replacing the the elements indexed 2-5 with the new list ['a','b'].
Now when, I do
p=list(range(10))
p[-2:-6:-1]=['a','b']
Python says ValueError: attempt to assign sequence of size 2 to extended slice of size 4
Why does it resize the list in the first case but not the second?