1.赋值与拷贝 直接赋值(b=a)是传引用,b改动a也会改动. a = [1, 2, 3, 4] b = a b[1] = 999 print(a, b) #[1, 999, 3, 4] [1, 999, 3, 4] b=a.copy()或者b=a[:]是传值,b改动不影响a. a = [1, 2, 3, 4] b = a.copy() b[1] = 999 print(a, b) #[1, 2, 3, 4] [1, 999, 3, 4] a = [1, 2, 3, 4] b = a[:] b[