input: Write a function to combine two dictionaries of similar structure together, such that the entries in the two dictionaries are merged into a single dictionary. If the dictionaries have common keys, the value from the second dictionary should overwrite the value from the first dictionary. If the input dictionaries are empty, the function should return an empty dictionary.
  assert merge_dict({'a':1, 'b':2, 'c':3}, {'d':4, 'e':5, 'f':6})=={'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6}
  assert merge_dict({'x':10, 'y':20}, {'y':30, 'z':40})=={'x': 10, 'y': 30, 'z': 40}
  assert merge_dict({}, {'p': 5, 'q': 6})=={'p': 5, 'q': 6}
  assert merge_dict({'k': 1}, {})=={'k': 1}
  assert merge_dict({}, {})=={}
output: def merge_dict(dict1, dict2):
      result = dict1.copy()
      result.update(dict2)
      return result