dict = {'abc': 'a', 'cdf': 'b', 'gh': 'a', 'fh': 'g', 'hfz': 'g'}
new_dict = {}
for pair in list(dict.items()):
    if pair[1] not in list(new_dict.keys()):
        new_dict[pair[1]] = []
new_dict[pair[1]].append(pair[0])
print(new_dict)
Find all Key-Elements by the same Value in Dicts