human
Write me a Python code to create a dictionary update without replacement.
assistant
Here is a Python code to create a dictionary update without replacement

import json

def update_dict(dictionary, key, value):
    """Updates a dictionary with a new key and value."""
    if key in dictionary:
        dictionary[key] = value
    else:
        dictionary[key] = value

# Enter the dictionary
dictionary = {"name": "dahlia", "age": "23", "city": "Delhi"}

# Enter the key and value
key = "city"
value = "Mumbai"

# Calling the function
print((update_dict(dictionary, key, value)))

#Example Output
# None

#Remember to inspect code for bugs.