<human>:  Write me a Python function for renaming a key in a dictionary.
<bot>: = dictionary.pop(old_key)

# Enter the dictionary
dictionary = {"key1": "value1", "key2": "value2"}

# Enter the old key
old_key = "key1"

# Enter the new key
new_key = "key2"

# Calling the function
print((rename_key(dictionary, old_key, new_key)))

#Example Output
# None

#Remember to inspect code for bugs.