I'm reading python cookbook, it mentioned that enumerate() returns an iterator yielding all the pairs(two -item tuples) of the form(index, item)
And I can use d=dict(enumerate(L)) to make a dict.
For my understanding, I thought enumerate() returns a tuple. And dict() can make a tuple into dict.
So I tried:
dict((1,2))
TypeError pops out.
So I'm wondering what object did enumerate actually returns here which dict() can make it into a dict?