You cannot use list () more than once on a map object

Does anyone know why:

x2 = map(lambda x: x, [2, 4, 6])
print(list(x2)) 
print(list(x2))

      

gives:

[2, 4, 6]
[]

      

As if I can list

only use it once per object map

. I do not understand what is going on.

+1


source to share





All Articles