Dict comprehensions, avoid allocating lists

Since I’m using a virtualenv to run this from, I’m not sure if `#!/usr/bin/env python` is what I want here