This a dictionary comprehension. It's similar to list comprehensions which you've used.