GeoFigs = {'Populus':0, 'Tristidia':1, 'Albus':2, 'Fortuna Major':3, 'Rubeus':4,
'Acquisitio':5, 'Conjunctivo':6, 'Caput Draconis':7, 'Laetita':8, 'Carcer':9,
'Amissio':10, 'Puella':11, 'Fortuna Minor':12, 'Puer':13, 'Cauda Draconis':14, 'Via':15}
KeyGeo = dict.copy(GeoFigs)
for key in KeyGeo:
print KeyGeo[key]
keychange = KeyGeo[key]
newValue = key
del KeyGeo[key]
KeyGeo[keychange] = newValue
When I run the for loop it skips over some of the keys producing
(0, 'Populus'), (1, 'Tristidia'), ('Carcer', 9), (3, 'Fortuna Major'), (4, 'Rubeus'),
(5, 'Acquisitio'), (6, 'Conjunctivo'), (7, 'Caput Draconis'), ('Puer', 13), (10, 'Amissio'),
(11, 'Puella'), (12, 'Fortuna Minor'), (2, 'Albus'), (14, 'Cauda Draconis'), (15, 'Via'), ('Laetita', 8)]
Any idea why it's skipping the 3rd and the 9th only?