Default Dict
collections.defaultdict is a nifty little fella. It takes a callable with no arguments in order to determine what to initialize a nonexistent key with. One neat trick is to use it for adding up field totals:
from collections import defaultdict
# Ass...
ohofone.hashnode.dev1 min read