Use python idioms (list compehensions, dict.get, dict.update)