Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- years = [2013, 2014, 2015, 2016, 2013, 2014]
- years_count = {}
- print(years)
- for item in years:
- if item in years_count:
- years_count[item] += 1
- else:
- years_count[item] = 1
- print(years_count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement