Summing 1-layer deep nested list in python

前端 未结 0 759
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 09:16

I tried the following

a = [[1], [2]]
print(sum(a))

I was expecting the output

[1, 2]

But I got thrown an erro

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