>>> import copy >>> a = [[1, 2],[5, 6], [8, 9]] >>> b = copy.copy(a) # 浅拷贝得到b >>> c = copy.deepcopy(a) # 深拷贝得到c >>> print(id(a), id(b)) # a 和 b 不同 139832578518984139832578335520 >>> for x, y in zip(a, b): # a 和 b 的子对象相同 ... print(id(x), id(y)) ... 139832578622816139832578622816 139832578622672139832578622672 139832578623104139832578623104 >>> print(id(a), id(c)) # a 和 c 不同 139832578518984139832578622456 >>> for x, y in zip(a, c): # a 和 c 的子对象也不同 ... print(id(x), id(y)) ... 139832578622816139832578621520 139832578622672139832578518912 139832578623104139832578623392