Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
list_a = ["a","a","a","a","b","b","c","d","d","d"]
print "before: %s" % list_a
print "after: %s" % list(set(list_a))
before: ['a', 'a', 'a', 'a', 'b', 'b', 'c', 'd', 'd', 'd']
after: ['a', 'c', 'b', 'd']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.