1- Solution 1: If you have control over the data while its being constructed, then store the data in a set instead as a list
2- Solution 2: If data is coming from api or database then you can process the data in the following way:
dictionary = {"a": [1, 1, 1, 2, 1, 3, 2, 3, 1], "b": [4, 5, 2, 1, 1, 5, 6, 2, 5]}
for each_key, value in dictionary.items():
   dictionary[each_key] = list(set(value))
Note: You lose the order of your lists.
Also, you should not keep your variable name as dict as its a python keyword