input: 
  from typing import Dict
  
  def delete_key(dic: Dict, k: str):
      """ Deletes a given key from the dictionary if it exists.
      >>> delete_key({'foo': 1, 'bar': 2, 'baz': 3}, 'baz')
      {'foo': 1, 'bar': 2}
      >>> delete_key({'name': 'Alice', 'age': 23}, 'age')
      {'name': 'Alice'}
      """
      if k in dic:
          del dic[k]
      return dic
  
output:     if k in dic:
          del dic[k]
      return dic