An expression is Python syntax that evaluates to a value. In comprehensions, it produces each output value while the iterable supplies inputs and an optional condition filters results. section 8.5
Choose a comprehension when creating a new object from returned values; choose a for loop when the goal is commands or side effects. In a dict comprehension, the expressions before and after the colon produce the key and value separately. section 8.19
[x*x #1 for x in range(10) #2 if x%2 == 0] #3
Read the comprehension as transformation on line 1, iteration on line 2, and filtering on line 3. section 8.5
{ KEY : VALUE
for ITEM in ITERABLE }
Use this template to identify the separate key and value expressions in a dictionary comprehension. section 8.19










