Are lines 19 and 20 redundant since you're using a default dict?