Here is the one-liner pythonic way to get the set of values from the list of values of a dictionary.
>>> aa={'a':[1,2,3,4], 'b':[3,4,5], 'c':[1,4,5]}>>> {v for _,vv in aa.items() for v in vv}{1, 2, 3, 4, 5}
>>> aa={'a':[1,2,3,4], 'b':[3,4,5], 'c':[1,4,5]}
>>> {v for _,vv in aa.items() for v in vv}
{1, 2, 3, 4, 5}