flattening list comprehension, two list comprehensions at once

后端 未结 0 1430
有刺的猬
有刺的猬 2020-12-08 08:07

How come this flattens the list L?

[item for sublist in L for item in sublist]

That doesn\'t make any sense to me, I don\'t know

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