You can apply the set() function to the given list to remove duplicates and then apply the list() function to cast the set to list.
Here is an example:
>>> aa = [1, 2, 3, 4, 4, 4, 5, 5]>>> aa[1, 2, 3, 4, 4, 4, 5, 5]>>> list(set(aa))[1, 2, 3, 4, 5]
>>> aa = [1, 2, 3, 4, 4, 4, 5, 5]
>>> aa
[1, 2, 3, 4, 4, 4, 5, 5]
>>> list(set(aa))
[1, 2, 3, 4, 5]