input: Write a function to delete a given key from a dictionary if it exists. If the key does not exist in the dictionary, do nothing. The function should modify the dictionary in place.  
  
  assert delete_key({'foo': 1, 'bar': 2, 'baz': 3}, 'baz')=={'foo': 1, 'bar': 2}  
  assert delete_key({'foo': 1, 'bar': 2, 'baz': 3}, 'qux')=={'foo': 1, 'bar': 2, 'baz': 3}  
  assert delete_key({}, 'baz')=={}
output: def delete_key(d, key):
      if key in d:
          del d[key]