【发布时间】:2015-12-01 04:01:54
【问题描述】:
所以我想改变这个嵌套(列表)让我们称之为 X
[['What if?', ' 2014', ' Randall Munroe'], ['Thing Explainer', ' 2015', ' Randall Munroe'], ['Alan Turing: The Enigma', ' 2014', ' Andrew Hodges']]
这个嵌套(列表)让它Y
[['What if', 'Thing Explainer', 'Alan Turing: The Enigma'], [ 2014,2015,2014], ['Randall Munroe, Randall Munroe, 'Andrew Hodges']]
Y 中的第一项是 X 中第 i 项的第一项。
['What if', 'Thing Explainer', 'Alan Turing: The Enigma']
Y中的第二项是X中第i项的第二项
['Randall Munroe, Randall Munroe, 'Andrew Hodges']
谁能分享一下python的思路和解决方案?
【问题讨论】:
-
map(list, zip(*X))
标签: python nested-loops nested-lists