from collections import defaultdict reversed_dict = defaultdict(list) for key, value in mydict.items(): reversed_dict[value].append(key)