Why list() with an object shows different results respectively?

Viewed 58

The outcome is None with list(a) the second time. Anyone have a clue on that?

>>> test = {1: 2, 3: 4}
>>> a= test.iterkeys()
>>> list(a)
**[1, 3]**
>>> list(a)
**[]**
>>> list(a)
[]
1 Answers
Related