concept dictionary comprehension in category python
appears as: dictionary comprehension, A dictionary comprehension

This is an excerpt from Manning's book Tiny Python Projects: Learn coding and testing with puzzles and games.
A dictionary comprehension is a way to build a dictionary in a one-line forloop.