Created
February 2, 2017 23:13
-
-
Save shamikalashawn/96ad81176d4ba536725f05f0d3b4ddd0 to your computer and use it in GitHub Desktop.
Given a list, a set is returned with all duplicates removed.
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 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