goalie.has_duplicates¶
- goalie.has_duplicates(x: Iterable[Hashable]) bool¶
Check whether the input has duplicate elements.
- Parameters:
x (iterable of hashable) – Values to check.
- Returns:
Trueif any element appears more than once.- Return type:
Examples
>>> has_duplicates(["a", "a"]) True >>> has_duplicates(["a", "b"]) False