BadPython.com

Suggestion for "Not using defaultdict"

Use the standard library
            
from collections import Counter

datas = [1, 2, 3, 4, 2, 3, 4, 1, 5]
d = dict(Counter(datas))