the result is a nested list and looks like this:
>>> results [[1, 2, 3, 'a', 'b'], [1, 2, 3, 'c', 'd'], [4, 5, 6, 'a', 'b'], [4, 5, 6, 'c', 'd']]
pr is a function with the definition:
>>> def pr(line): ... print line
Normal iteration according to the results behaves as follows:
>>> for result in results: ... pr(result) ... [1, 2, 3, 'a', 'b'] [1, 2, 3, 'c', 'd'] [4, 5, 6, 'a', 'b'] [4, 5, 6, 'c', 'd']
But an implicit iteration with a map leads to this behavior:
>>> map(pr, results) [1, 2, 3, 'a', 'b'] [1, 2, 3, 'c', 'd'] [4, 5, 6, 'a', 'b'] [4, 5, 6, 'c', 'd'] [None, None, None, None]
My question is : Why does the map function create an additional iteration?