You can always unpack a tuple that way, like in: .>>> import sys .>>> for (index, (key, value)) in enumerate(sys.modules.iteritems()): pass