版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/soulwyb/article/details/86244204
直接上代码 感觉很屌 留下来
>>> list1 = [1,2,[3,3,3],4,5]
>>> list1 = list1[:2] + list1[2][:] + list1[3:5]
>>> list1
[1, 2, 3, 3, 3, 4, 5]
直接上代码 感觉很屌 留下来
>>> list1 = [1,2,[3,3,3],4,5]
>>> list1 = list1[:2] + list1[2][:] + list1[3:5]
>>> list1
[1, 2, 3, 3, 3, 4, 5]