Skip to content

Instantly share code, notes, and snippets.

@suganoo
Created September 12, 2017 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suganoo/490e3224013ce7639554c87fbee95ddd to your computer and use it in GitHub Desktop.
Save suganoo/490e3224013ce7639554c87fbee95ddd to your computer and use it in GitHub Desktop.
リストで重複除く
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