Eric V. Smith added the comment:
That's the correct behavior. The elements given by the start and end range are
replaced by what's on the right hand side of the assignment. They don't need to
be the same length.
>>> list_test=[0,1,2,3,4,5,6]
>>> list_test[2:5] = ['two', 'three']
>>> list_tes
New submission from iqanansoft :
Hello, in a list, when using the slice notation, if a higher rank is placed
than the new data, the positions of the list are removed
list_test=[0,1,2,3,4,5,6]
list_test[2:4]=["two","three"]
result-->[0,1,'two','three',4,5,6]
this is correct, but this
list_