Update description of remove_list_redundancies

This commit is contained in:
Grant Sanderson 2024-09-21 12:15:29 -04:00
parent 3e7244b90b
commit 62a4ea5165

View file

@ -16,7 +16,7 @@ if TYPE_CHECKING:
def remove_list_redundancies(lst: Sequence[T]) -> list[T]:
"""
Used instead of list(set(l)) to maintain order
Remove duplicate elements while preserving order.
Keeps the last occurrence of each element
"""
return list(reversed(dict.fromkeys(reversed(lst))))