Created
September 12, 2017 08:25
-
-
Save suganoo/490e3224013ce7639554c87fbee95ddd to your computer and use it in GitHub Desktop.
リストで重複除く
This file contains 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
list_a = ["a","a","a","a","b","b","c","d","d","d"] | |
print "before: %s" % list_a | |
print "after: %s" % list(set(list_a)) |
This file contains 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
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