Skip to content

Instantly share code, notes, and snippets.

@ricardodani
Created November 5, 2024 14:18
Show Gist options
  • Save ricardodani/9f5fb21bd8f125dafa6cf00ba5ed3356 to your computer and use it in GitHub Desktop.
Save ricardodani/9f5fb21bd8f125dafa6cf00ba5ed3356 to your computer and use it in GitHub Desktop.
find_duplicates.py
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