input: Write a function to convert a date from one format to another.
  assert convert_date_format("May 14, 2020", "%b %d, %Y", "%d-%m-%Y") == "14-05-2020"
  assert convert_date_format("2020-05-14", "%Y-%m-%d", "%d/%m/%Y") == "14/05/2020"
  assert convert_date_format("14/05/2020", "%d/%m/%Y", "%m-%d-%Y") == "05-14-2020"
output: from datetime import datetime
  
  def convert_date_format(date_str, from_format, to_format):
      date_obj = datetime.strptime(date_str, from_format)
      return date_obj.strftime(to_format)