元祖: 元祖的一级元素不可修改,不能增加或者删除(被加工的数组)
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' 元祖: 元祖的一级元素不可修改,不能增加或者删除(被加工的数组) ''' tu = (111,222,333,[(111111),[222,333,444]]) w = 0 tu[3][0] = 444 tu[3][1][0] = 123465789 while w < len(tu) : print(tu[w],end=" ") w += 1 print() s = "三生三世十里桃花" vs = tuple(s) print(vs) li = list(vs) print(li) qq = "_" vsqq = qq.join(vs) print(vsqq)
运行结果
来源:https://www.cnblogs.com/Dzc163/p/8506480.html