Created
November 5, 2024 14:18
-
-
Save ricardodani/9f5fb21bd8f125dafa6cf00ba5ed3356 to your computer and use it in GitHub Desktop.
find_duplicates.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_duplicates(check_list): | |
occurrences = set() | |
new_list = [] | |
for i in check_list: | |
if i in occurrences: | |
new_list.append(i) | |
return new_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment