Up: Dictionary comprehension [Top][Contents]
if
{x: x * 10 for x in [1, 2, 3, 4, 5] if x % 2 == 0}
{2: 20, 4: 40}