a=['Bitcoin', 'Ethereum', 'XRP', 'Bitcoin Cash']
b=['$6,445.52', '$210.63', '$0.47', '$577.37']
c=['$2799740715', '$169677687', '$613043970', '$1585569914']
假设我有3个名为a,b,c.
的列表
现在如何在python中像D
和E
那样转换它们。
D =['Bitcoin','$6445.52','$2799740715'],
['Ethereum','$210.63','$1696377687'],
['XRP','$0.47','$613043970'],
['Bitcoin Cash','$577.37','$1585569914'],
E= ['Bitcoin',$6,445.52','$2799740715',
'Ethereum','$210.63','$169677687',
'XRP','$0.47','$613043970',
'BitcoinCash','$577.37','$1585569914'
]
答案 0 :(得分:0)
a=['Bitcoin', 'Ethereum', 'XRP', 'Bitcoin Cash']
b=['$6,445.52', '$210.63', '$0.47', '$577.37']
c=['$2799740715', '$169677687', '$613043970', '$1585569914']
D=[[i,j,k] for i,j,k in zip(a,b,c)]
E=[]
E+=D[0]+D[1]+D[2]+D[3]