{"description":">>> import operator >>> l = [[1,2,3],[4,5,6], [7], [8,9]] >>> reduce(operator.concat, l) [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> l [[1, 2, 3], [4, 5, 6], [7], [8, 9]] >>> reduce(operator.add, l) [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> reduce(lambda x, y: x+y, l) [1, 2, 3, 4, 5, 6, 7, 8, 9] \u89e3\u6cd5\u3068\u3057\u3066\u306f\u3053\u3046\u306a\u308b\u3093\u3060\u308d\u3046\u3051\u3069\u3001\u306a\u3093\u3067flatt\u2026","blog_url":"https://www.shigemk2.com/","author_name":"shigemk2","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F2018%2F08%2F03%2F191530\" title=\"Python flatten - by shigemk2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Python"],"author_url":"https://blog.hatena.ne.jp/shigemk2/","width":"100%","type":"rich","published":"2018-08-03 19:15:30","blog_title":"by shigemk2","url":"https://www.shigemk2.com/entry/2018/08/03/191530","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","height":"190","image_url":null,"version":"1.0","title":"Python flatten"}