BadPython.com

Suggestion for "Not using defaultdict"

Use collections.Counter for counting
            
datas = [1, 2, 3, 4, 2, 3, 4, 1, 5]
d = collections.Counter(datas)