To remove duplicate we can use set and pass it to the list()function:-
Below is an example that solves your problem :
t = [1, 2, 3, 1, 2, 5, 6, 7, 8]
list(set(t))
s = [1, 2, 3]
list(set(t) - set(s))
As we know sets themselves are unordered collections, so the order is lost after conversion. So we need to set it back to a list, for getting an arbitrary order.
The following code maintains the order of the elements after conversion:-
from collections import OrderedDict
list(OrderedDict.fromkeys(t))
To know more about this you can have a look at the following video tutorial:-