åè 1段ãã¹ããããªã¹ããflattenããæ¹æ³ Making a flat list out of list of lists in Python - Stack Overflow 2段以ä¸ãã¹ããããªã¹ããflattenããæ¹æ³ Flatten (an irregular) list of lists in Python - Stack Overflow Right Foot In: More on python flatten è²ã æ¹æ³ãããã¿ãããªã®ã§æ¸çãã 1段ãã¹ããããªã¹ããflattenããã¨ã¯ ã¤ã¾ãã l = [[1,2,3],[4,5,6], [7], [8,9]] ã [1,2,3,4,5,6,7,8,9] ã«ããã¨ãããã¨ã reduceã使ã£ãæ¹æ³ reduceã使ã£ã¦ãªã¹ããç³ã¿è¾¼ããã¨ãã§ããã reduce(lambda x,y: x+y,l) çµè¾¼ã¿
{{#tags}}- {{label}}
{{/tags}}