如何实现tuple与list 的转换
1、tp = (11, 22, 33, 44)print(type(tp))tp_list = list(tp)print(type(tp_list))这里有个tuple,转换为list,我们用list()函数就可以转换了。

3、tp = (11, 22, 33, 44)tp_list = list()for i in tp: tp_list.append(i)print(tp_list)创建列表的形式也可以允许这样书写,结果是一样的。

5、但是我们不能用循环添加的方法来转换为tuple,因为tuple是不可改变的数据类型。
