列表复制 浅拷贝:简单类型元素全复制,引用类型元素只复制引用 L1 = [3,2,1,[4,5,6],8,'abc'] L1 [3, 2, 1, [4, 5, 6], 8, 'abc'] L2 = L1.copy() L2 [3, 2, 1, [4, 5, 6], 8, 'abc'] L1[3][1] = 10 #修改L1中的元素L2也随之变化 L1 [3, 2, 1, [4, 10, 6], 8, 'abc'] L2 [3, 2, 1, [4, 10, 6], 8, 'abc'] 深拷贝:co…