d1 = {'ali': 123, 'veli': 432, 'selami': 892, 'ayşe': 45, 'fatma': 574} d2 = {d1[key]: key for key in d1} print(d2)