input: Write a function to delete a given key from a dictionary.
  assert delete_key({'foo': 1, 'bar': 2, 'baz': 3}, 'bar')=={'foo': 1, 'baz': 3}
  assert delete_key({'a': 10, 'b': 20}, 'c')=={'a': 10, 'b': 20}
  assert delete_key({'x': 5, 'y': 6}, 'x')=={'y': 6}
  assert delete_key({}, 'z')=={}
output: def delete_key(d, key):
      if key in d:
          del d[key]
      return d