Python 拷贝对象(深拷贝deepcopy与浅拷贝)
>>> import copy
>>> a = [1,2,3,4,['a','v']]
>>> b = a
>>> b
[1, 2, 3, 4, ['a', 'v']]
>>> c = copy.copy(a)
>>> c
[1, 2, 3, 4, ['a', 'v']]
>>> d = copy.deepcopy(a)
>>> d
[1, 2, 3, 4, ['a', 'v']]
>>> a.append(5)
>>> a
[1, 2, 3, 4, ['a', 'v'], 5]
>>> b
[1, 2, 3, 4, ['a', 'v'], 5]
>>> c
[1, 2, 3, 4, ['a', 'v']]
>>> d
[1, 2, 3, 4, ['a', 'v']]
>>> a[4].append('c')
>>> a
[1, 2, 3, 4, ['a', 'v', 'c'], 5]
>>> b
[1, 2, 3, 4, ['a', 'v', 'c'], 5]
>>> c
[1, 2, 3, 4, ['a', 'v', 'c']]
>>> d
[1, 2, 3, 4, ['a', 'v']]