dict.items()
returns a list of 2-tuples ([(key, value), (key, value), ...]
), whereas dict.iteritems()
is a generator that yields 2-tuples. The former takes more space and time initially, but accessing each element is fast, whereas the second takes less space and time initially, but a bit more time in generating each element.