Created
July 5, 2012 07:28
-
-
Save mlevans/3052009 to your computer and use it in GitHub Desktop.
Find Duplicates in a List
This file contains hidden or 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
# Finding duplicates in a list | |
import collections | |
the_list = [2,2,2,1,1,0] | |
count = collections.Counter(the_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment