Why does
zip(*[xrange(5)]*2)
give [(0, 0), (1, 1), (2, 2), (3, 3), (4, 4)] but
zip(*[iter(xrange(5))]*2)
give [(0, 1), (2, 3)]?
I always though that generator were iterators, so iter on a generator was a no-op.
For example,
list(iter(xrange(5)))
[0, 1, 2, 3, 4]
is the same as
list(xrange(5))
[0, 1, 2, 3, 4]
(The same is true for Python 3, but with list(zip( and range.)