I have a dictionary of unique keys where some keys share the same value.
For example:
D = {'ida':{'key':'1'},'idb':{'key':'2'},'idc':{'key':'3'},'idd':{'key':'3'},'ide':{'key':'4'},'idf':{'key':'4'},'idg':{'key':'4'}}
I want a list of keys that share the same value with other keys.
In this case, it would be
l = ['idc','idd','ide','idf','idg']
However, I want to exclude one key from all sets of keys that share the same value.
For example, I'd like to have the keys
l = ['idd','idf','idg']
which excludes 'idc' and 'ide'
or it could be
l = ['idc','ide','idf']
which excludes 'idd' and 'idg'.