mirror of
https://github.com/3b1b/manim.git
synced 2025-11-13 14:27:45 +00:00
Update description of remove_list_redundancies
This commit is contained in:
parent
3e7244b90b
commit
62a4ea5165
1 changed files with 1 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
def remove_list_redundancies(lst: Sequence[T]) -> list[T]:
|
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
|
Keeps the last occurrence of each element
|
||||||
"""
|
"""
|
||||||
return list(reversed(dict.fromkeys(reversed(lst))))
|
return list(reversed(dict.fromkeys(reversed(lst))))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue