元组的一级元素不可修改
#元组,有序
tu = (111,"alex",(11,22),[(33,44)],True,33,44,)
v = tu[3][0][0]
print(v) #输出结果 :33
v1 = tu[3]
print(v1) #输出结果:[(33, 44)]
tu[3][0] = 567
print(tu) #输出结果:(111, 'alex', (11, 22), [567], True, 33, 44)
2023-10-07 18:16:16
tu = (111,"alex",(11,22),[(33,44)],True,33,44,)
v = tu[3][0][0]
print(v) #输出结果 :33
v1 = tu[3]
print(v1) #输出结果:[(33, 44)]
tu[3][0] = 567
print(tu) #输出结果:(111, 'alex', (11, 22), [567], True, 33, 44)
下一篇:浅谈Pool对象