BadPython.com

Suggestion for "Not using defaultdict"

Standard library already provides Counter. Also, data is already plural (sing. is datum)
            
from collections import Counter

data = [1, 2, 3, 4, 2, 3, 4, 1, 5]

d = Counter(data)