<human>:  Can you show me a Python function to delete from a dictionary if there exists.
<bot>:

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

# Calling the function
print((delete_if_exists(dictionary, "key1")))

#Example Output
# None

#Remember to inspect code for bugs.