remove_duplicates¶
- emlib.misc.remove_duplicates(seq)[source]¶
Remove all duplicates in seq while keeping its order If order is not important, use list(set(seq))
- Parameters:
seq (
Sequence[TypeVar(T)]) – a list of elements (elements must be hashable)- Return type:
list[TypeVar(T)]- Returns:
a new list with all the unique elements of seq in its original order
Note
list(set(…)) does not keep order