deepcopy的用法
浅拷贝:>>> a =
>>> b = a
>>> id(b)
2440623510600
>>> id(a)
2440623510600
>>> a is b
True
>>>深拷贝:
>>> import copy
>>> c = copy.deepcopy(a)
>>> id(c)
2440653257544
>>> id(a)
2440623510600
>>> a.append(77)
>>> b
>>> a
>>> c
>>>
支持楼主!!!{:5_105:} 感谢
页:
[1]