摘要:
import copy #需要先倒入模块husband = ['xiaohu',123,[15000,9000]]wife = husband.copy()wife[0] = 'xiaopang'wife[1] = 234# xiaosan = copy.copy()#浅拷贝xiaosan = co 阅读全文
摘要:
# s1 = [1,'alex','lda']# s2 = s1.copy()# s2[0] = 2# print('s1 ',s1)# print('s2 ',s2)# a = [[1,2],3,4]#浅copy只copy第一层#用途: 银行的关联账户,一个账户取钱,另一个账户的钱也会减少husb 阅读全文