Transpose using a map() and lambda

前端 未结 0 1492
春和景丽
春和景丽 2021-01-27 05:47

I came across the following code:

l = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
list(map(lambda *a: list(a), *l)) 

which returns: [[1, 4, 7], [2, 5

相关标签:
回答
  • 消灭零回复
提交回复
热议问题