input: Write a function to delete a given key from a dictionary. If the key is present in the dictionary, remove it; otherwise, do nothing. The function should directly modify the input dictionary and should not return any value.
  assert delete_key({'foo': 1, 'bar': 2, 'baz': 3}, 'baz')==None
  assert delete_key({'foo': 1, 'bar': 2, 'baz': 3}, 'qux')==None
  assert delete_key({}, 'baz')==None
  initial_dict = {'foo': 1, 'bar': 2, 'baz': 3}
  delete_key(initial_dict, 'foo')
  assert initial_dict=={'bar': 2, 'baz': 3}
output: def delete_key(d, key):
      if key in d:
          del d[key]