Just learned that the object returned from map()
doesn't hold up once it has been used in a in
expression or it was converted into a list.
What is causing b
to get emptied at the end?
>>> a = [1, 2, 3]
>>> b = map(lambda x: x, a)
>>> b
<map object at 0x104d8ccc0>
>>> list(b)
[1, 2, 3]
>>> list(b)
[]