Predict

The Disappearing Map

map is lazy: it produces values only when someone asks for them. What happens if two people ask?

glows = map(lambda x: x * 10, [1, 2, 3])
print(sum(glows), list(glows))

What does this program print?