def enumdict(d):
for key, value in d.items():
yield (key, value)
d = { 'a': 0, 'b': 1 }
e = dict(enumdict(d))
print(e)
e = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 5, 'f': 4}
print(e)
{'d': 3, 'e': 5, 'a': 0, 'f': 4, 'b': 1, 'c': 2}
g = [('a', 0), ('b', 1), ('c', 2), ('d', 3)]
print(g)
[('a', 0), ('b', 1), ('c', 2), ('d', 3)]