L = T[2]这个不应该是赋值语句么,为什么L中的元素变化,T[2]会跟着变化
T = (1, 'CH', [3, 4]) L = T[2] print(L) # ==> [3, 4] # 尝试替换L中的元素 L[1] = 40 print(L) # ==> [3, 40] print(T) # ==> (1, 'CH', [3, 40])
T = (1, 'CH', [3, 4]) L = T[2] print(L) # ==> [3, 4] # 尝试替换L中的元素 L[1] = 40 print(L) # ==> [3, 40] print(T) # ==> (1, 'CH', [3, 40])
2021-04-07
举报