Does anyone one know why:
x2 = map(lambda x: x, [2, 4, 6])
print(list(x2))
print(list(x2))
gives:
[2, 4, 6]
[]
It is as if I can only use list
once on the map
object. I do not understand what is happening.
Does anyone one know why:
x2 = map(lambda x: x, [2, 4, 6])
print(list(x2))
print(list(x2))
gives:
[2, 4, 6]
[]
It is as if I can only use list
once on the map
object. I do not understand what is happening.