# 1.元组对象不可修改,元组中列表对象的对象可以修改 t = (1,2,[1,2,3]) t[2] = [1,2,3,4] # 'tuple' object does not support item assignment t[2].append(4) # 此时t=(1, 2, [1, 2, 3, 4]) # 2.tuple()将序列或迭代器转化为元组 tuple([1,2,3]) # (1, 2, 3) tuple('str') # ('s', 't', 'r') tuple(range(4…