Why does index assignment of another list form a linked list and list slice(one element slice) assignment of another list makes the list part of the original list when both the slice and element with the index points the same element? What changes happen in the memory allocation?
l = [1,2,3,4,5,6]
l[2:3] = [7,8] # gives [1,2,7,8,5,6]
# whereas:
l[2] = [7,8] # gives [1,2,[7,8],4,5,6]
and initialy l[2]=3 and l[2:3]=3