I am trying to understand if it makes sense to take the content of a list and append it to another list.
I have the first list created through a loop function, that
Using the map() and reduce() built-in functions
map()
reduce()
def file_to_list(file): #stuff to parse file to a list return list files = [...list of files...] L = map(file_to_list, files) flat_L = reduce(lambda x,y:x+y, L)
Minimal "for looping" and elegant coding pattern :)