Skip to content

Instantly share code, notes, and snippets.

@CheeseCake87
Created June 15, 2024 07:46
Show Gist options
  • Save CheeseCake87/5f0a962066cc5df9fc9828329c962390 to your computer and use it in GitHub Desktop.
Save CheeseCake87/5f0a962066cc5df9fc9828329c962390 to your computer and use it in GitHub Desktop.
def reverse_dict(input_dict: dict) -> dict:
"""
Swaps the values with keys of a dict
"""
return {v: k for k, v in input_dict.items()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment