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

import random

def update_dict(d, k, v):
        """
        Updates a dictionary with a new key-value pair.
        :param d: (dict)
        :param k: (str)
        :param v: (str)
        :return: (dict)
        """
        if k in d:
            d[k] = v
        else:
            d[k] = v

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

# Calling the function
print((update_dict(d, "key3", "value3")))

# Printing the dictionary
print(d)

#Example Output
# None
# {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}

#Remember to inspect code for bugs.