python dic reverse code example Example: reverse dictionary python inv_map = {v: k for k, v in my_map.items()}