import copy #引用模块copy
names=[‘Lishan‘,‘Yuanming‘,[‘Quyan‘,‘Liuzhen‘,‘Pengqiang‘],‘Fanyi‘,‘Jixue‘]
name2 = names.copy()
name3 = copy.copy(names)
print(names)
print(name2)
时间: 2024-10-19 00:14:08
import copy #引用模块copy
names=[‘Lishan‘,‘Yuanming‘,[‘Quyan‘,‘Liuzhen‘,‘Pengqiang‘],‘Fanyi‘,‘Jixue‘]
name2 = names.copy()
name3 = copy.copy(names)
print(names)
print(name2)