hpcflow.sdk.core.utils.get_duplicate_items#

hpcflow.sdk.core.utils.get_duplicate_items(lst)#

Get a list of all items in an iterable that appear more than once, assuming items are hashable.

Examples

>>> get_duplicate_items([1, 1, 2, 3])
[1]
>>> get_duplicate_items([1, 2, 3])
[]
>>> get_duplicate_items([1, 2, 3, 3, 3, 2])
[2, 3]
Parameters:

lst (Iterable[T]) –

Return type:

list[T]