Created
November 26, 2013 03:33
-
-
Save Nataila/7653082 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
mylist = [2,2,2,2,2,2,3,3,3,3] | |
mylist.sort() | |
myset = set(mylist) | |
for item in myset: | |
print mylist.count(item), " of ", item, " in list" |
count = {}
for item in mylist:
count[item] = mylist.count(item)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks, get sort and reverse methods.