Invert dictionary
Inverts a dictionary with unique hashable values.
- Use
dictionary.items()
in combination with a list comprehension to create a new dictionary with the values and keys inverted.
Inverts a dictionary with unique hashable values.
dictionary.items()
in combination with a list comprehension to create a new dictionary with the values and keys inverted.