<human>:  remove key from dictionary if exist.
<bot>:
  return dictionary

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

# Enter the key
key = "key1"

# Calling the function
print((remove_key_from_dict(dictionary, key)))

#Example Output
# {'key2': 'value2'}

#Remember to inspect code for bugs.