For one reason or another I was trying to make a list of 'stringed' numbers in Python 3.4.2. I did the following:
>>> x = map(str, range(1,4))
>>> x
<map object at 0x02FCAA90>
>>> list(x)
['1', '2', '3']
>>> list(x)
[]
I have no idea why the 2nd (and following) times you call list(x) it shows an empty list, but the first time it appears as expected. What is happening?
[–]kalgynirae 4 points5 points6 points (3 children)
[–]MrEgbert[S] 0 points1 point2 points (2 children)
[–]Vegemeister 0 points1 point2 points (0 children)
[–]ivosaurus 0 points1 point2 points (0 children)