# Python Everyday 10: Swap key and value by using dictionary comprehension

Table of Content

How to swap key and value for a dict in Python, like this?

By using dictionary comprehension, we can do this in one line: