BadPython.com
Submit Bad Python
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))
Next Suggestion:
Use collections.Counter for counting