# -*- coding: utf-8 -*-
import copy
# 浅copy
# 使用场景,比如A,B夫妻共有一个银行账户,存取马宁的数据
username = ["name", ["saving", 1000]]
zhangsan = copy.copy(username)
zhangfuren = copy.copy(username)
print(zhangfuren)
print(zhangsan)
zhangfuren[1][1] = "20000"
print(zhangfuren)
print(zhangsan)
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/280088.html