rxn.utilities.containers.remove_duplicates
- rxn.utilities.containers.remove_duplicates(seq, key=None)[source]
Remove duplicates and preserve order.
Relies on the function
iterate_unique_values
, only converts its output to a list.- Parameters
seq (
Iterable
[TypeVar
(T
)]) – sequence to remove duplicates from.key (
Optional
[Callable
[[TypeVar
(T
)],TypeVar
(V
)]], default:None
) – what to base duplicates on, must be hashable. Defaults to the elements of seq.
- Return type
List
[TypeVar
(T
)]- Returns
a list without duplicates.