Skip to content

Instantly share code, notes, and snippets.

@tfolkman tfolkman/counter.py
Created Oct 25, 2019

Embed
What would you like to do?
counter
from collections import Counter
ages = [22, 22, 25, 25, 30, 24, 26, 24, 35, 45, 52, 22, 22, 22, 25, 16, 11, 15, 40, 30]
value_counts = Counter(ages)
print(value_counts.most_common())
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.