import copy
'''
赋值拷贝
'''print('---赋值拷贝---')
one =[1,2,3]
two = one
print(one, two)
two[0]=0print(one, two)
one =[[1],[2],[3]]
two = one
print(one, two)
two[0]=[0]print(one, two)
one =[[1],[2],[3]]
two = one
print(one, two)
two[0][0]=0print(one, two)'''
深拷贝
'''print('---深拷贝---')
one =[1,2,3]
two = copy.deepcopy(one)print(one, two)
two[0]=0print(one, two)
one =[[1],[2],[3]]
two = copy.deepcopy(one)print(one, two)
two[0]=[0]print(one, two)
one =[[1],[2],[3]]
two = copy.deepcopy(one)print(one, two)
two[0][0]=0print(one, two)'''
浅拷贝
'''print('---浅拷贝---')
one =[1,2,3]
two = one.copy()print(one, two)
two[0]=0print(one, two)
one =[[1],[2],[3]]
two = one.copy()print(one, two)
two[0]=[0]print(one, two)
one =[[1],[2],[3]]
two = one.copy()print(one, two)
two[0][0]=0print(one, two)