元组中的元素不能被修改

v1 = (11,22,33)

v1[0] = 666 错误

 

v1 = (11,(22,33),44)

 

v1 = (11,22,33,[44,55,66])

v1[-1][1] = 666 

 

v1=[11,22,(33,44,55)]

v1[-1] = 666

 

posted @ 2019-05-19 17:46  小僧回头啦  阅读(994)  评论(0编辑  收藏  举报