mydict = {1: 'a', 2: 'b'} for i, (k, v) in enumerate(mydict.items()): print(i,k,v) #will print # 0 1 a # 1 2 b