Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python flatten list

from functools import reduce

my_list = [[1], [2, 3], [4, 5, 6, 7]]
print(reduce(lambda x, y: x+y, my_list))
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #flatten #list
ADD COMMENT
Topic
Name
2+4 =