dataArray=[(),(),()]
alist=[]
for i in dataArray:
array=[]
for j in i:
array.append(j)
alist.append(array)
更简单的方法就是
alist=[[j for j in i] for i in dataArray]
dataArray=[(),(),()]
alist=[]
for i in dataArray:
array=[]
for j in i:
array.append(j)
alist.append(array)
更简单的方法就是
alist=[[j for j in i] for i in dataArray]
转载于:https://www.cnblogs.com/xianhaiyan/p/5747228.html