Wade Leftwich wrote: > def invert_dict(D): > return dict([(y,x) for (x,y) in D.items()]) No, this one only works for non-sequence-type values. I wanted to map every item of a value (a sequence) to the corresponding key. --Irmen