I would like to reverse a 1 to n dictionnary in python. Initial dictionnary:
initial = {'A1':'A','A2':'A','B1':'B'}
I would like to get the following result:
final = {'A':['A1','A2'],'B':['B1']}
Do you know how I could do that efficiently?
Many thanks