切片赋值时,多了会加,少了会补齐
>>> a = [] >>> a.append(1) >>> a [1]
切片赋值后,得到的结果
>>> a[0:1]=[1,2,3,4] >>> a [1, 2, 3, 4] >>> a[0:2]=[1,2,3,4] >>>
>>> a = [1] >>> a = [1,2] >>> a[0:2]=[1,2,3,4] >>> a [1, 2, 3, 4] >>>