Skip to content

Instantly share code, notes, and snippets.

@mudgen
Created September 24, 2013 15:41
Show Gist options
  • Select an option

  • Save mudgen/6686717 to your computer and use it in GitHub Desktop.

Select an option

Save mudgen/6686717 to your computer and use it in GitHub Desktop.
Unique List
def unique(items):
found = set()
keep = []
for item in items:
if item not in found:
found.add(item)
keep.append(item)
return keep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment