Skip to content

Instantly share code, notes, and snippets.

@shamikalashawn
Created February 2, 2017 23:13
Show Gist options
  • Save shamikalashawn/96ad81176d4ba536725f05f0d3b4ddd0 to your computer and use it in GitHub Desktop.
Save shamikalashawn/96ad81176d4ba536725f05f0d3b4ddd0 to your computer and use it in GitHub Desktop.
Given a list, a set is returned with all duplicates removed.
def remove_duplicates(list):
newset = set()
for num in range(len(list)):
for item in list:
newset.add(item)
return newset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment