一、Python3多维元组全部转换成列表
a = ((1,2,3),(4,5,6,),(7,8,9))
b = list(a)
print(b)
for c in b:b[b.index(c)] = list(c)
print(b)
二、list()、tuple()、join()
1.list()方法是把str或元组转换成列表
2.tuple()方法是把str或列表转换成元组
>>>a="abcde"
>>>list(a)
['a','b','c','d','e']
>>>tuple(a)
('a','b','c','d','e')
>>>tuple(list(a))
('a','b','c','d','e')
>>>list(tuple(s))
['a','b','c','d','e']
3. join函数是把列表和元组转换成str
>>> " ".join(tuple(a))
'abcde'
>>> " ".join(list(a))
‘abcde’
>>>str(tuple(a))
"('a','b','c','d','e')"