Skip to content

Instantly share code, notes, and snippets.

@Flushot
Created June 14, 2013 22:48
Show Gist options
  • Select an option

  • Save Flushot/5785893 to your computer and use it in GitHub Desktop.

Select an option

Save Flushot/5785893 to your computer and use it in GitHub Desktop.
def uniq(seq):
seen = set()
seen_add = seen.add
return [ x for x in seq if x not in seen and not seen_add(x) ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment