元组和字典的魔法

#元组的二级元素可以修改和删除
test = ([1,2,3],)
print(test)
del test[0][2]
print(test)
test[0][1] = 1234
print(test)
——————————执行结果——————————

([1, 2, 3],)
([1, 2],)
([1, 1234],)

  

猜你喜欢

转载自www.cnblogs.com/lemonbk/p/10612963.html