BadPython.com
Submit Bad Python
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)
Next Suggestion:
Use the standard library