BadPython.com
Submit Bad Python
Suggestion for
"Not using defaultdict"
Use collections.Counter for counting
datas = [1, 2, 3, 4, 2, 3, 4, 1, 5] d = collections.Counter(datas)
Next Suggestion:
Use Defaultdict or (even better) Counter