fork download
  1. dict1 = {32: 33.0, 75: 1600.0, 62: 2526.0}
  2. dict2 = {'8': 75, '43': 62, '16': 32}
  3.  
  4. newdict = dict([(x, dict1[y]) for x, y in dict2.items() ])
  5. # {'8':1600.0,'16':33.0,'43':2526.0}
  6. print(newdict)
Success #stdin #stdout 0.02s 8688KB
stdin
Standard input is empty
stdout
{'16': 33.0, '8': 1600.0, '43': 2526.0}