I have two lines in my program that seems fairly simple but has been given me some headache
here it is
costs = sum([map(int, f.readline().strip().split(' ')) for i in range(8)], [])
awards = sum([map(int, f.readline().strip().split(' ')) for i in range(8)], [])
It gives me the error: TypeError: can only concatenate list (not "map") to list
It seems to me that it something to do with python 2 to python 3 version but I can't figure it out!
I am stuck in this for several hours and cant find a solution. Any help ?
sumto flatten a list of lists. It's highly inefficient.