directlyrather than generating new list object for the result index assignment in python works much as it does in and most other languagespython replaces the single object reference at the designated offset with new one slice assignmentthe last operation in the preceding examplereplaces an entire section of list in single step because it can be bit complexit is perhaps best thought of as combination of two steps deletion the slice you specify to the left of the is deleted insertion the new items contained in the iterable object to the right of the are inserted into the list on the leftat the place where the old slice was deleted this isn' what really happensbut it can help clarify why the number of items inserted doesn' have to match the number of items deleted for instancegiven list of two or more itemsan assignment [ : ]=[ , replaces one item with two--python first deletes the one-item slice at [ : (from offset up to but not including offset )then inserts both and where the deleted slice used to be this also explains why the second slice assignment in the following is really an insert --python replaces an empty slice at [ : with two itemsand why the third is really deletion--python deletes the slice (the item at offset )and then inserts nothingl [ [ : [ [ [ : [ [ [ : [ [ replacement/insertion insertion (replace nothingdeletion (insert nothingin effectslice assignment replaces an entire sectionor "column,all at once--even if the column or its replacement is empty because the length of the sequence being assigned does not have to match the length of the slice being assigned toslice assignment can be used to replace (by overwriting)expand (by inserting)or shrink (by deletingthe subject list it' powerful operationbut franklyone that you may not see very often in practice there are often more straightforward and mnemonic ways to replaceinsertand delete (concatenationand the insertpopand remove list methodsfor example)which python programmers tend to prefer in practice this description requires elaboration when the value and the slice being assigned overlapl[ : ]= [ : ]for instanceworks fine because the value to be inserted is fetched before the deletion happens on the left lists in action