Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. years = [2013, 2014, 2015, 2016, 2013, 2014]
  2. years_count = {}
  3. print(years)
  4. for item in years:
  5. if item in years_count:
  6. years_count[item] += 1
  7. else:
  8. years_count[item] = 1
  9. print(years_count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement