Human: Python program to invert a dictionary. Assistant: 
Here is a Python program to invert a dictionary

import random

def invert_dict(d):
    """Inverts a dictionary.

    Args:
        d (dict): The dictionary to invert.

    Returns:
        dict: The inverted dictionary.
    """
    return {v: k for k, v in list(d.items())}

# Enter the dictionary
d = {"a": "b", "c": "d"}

# Calling the function
print((invert_dict(d)))

#Example Output
# {'b': 'a', 'd': 'c'}

#Remember to inspect code for bugs.