1from collections import Counter
2mylist = ['red','green','blue','red','orange','red','green']
3
4counts = Counter(mylist)
5for item, count in counts.items():
6 counts[item] /= 14
7
8print(counts)
9# Counter({'red': 0.21428571428571427, 'green': 0.14285714285714285,
10# 'blue': 0.07142857142857142, 'orange': 0.07142857142857142})
11