input: Write a function to create a REST API in Python using Flask that allows for deleting an item from a list. The function should define a route for deleting an item and another route for retrieving the list of items. If the item to be deleted is found in the list, it should be removed and a success message should be returned. If the item is not found, an appropriate message should be returned.
  assert delete_item("Banana")=={"message": "Item successfully deleted."}
  assert delete_item("Grapes")=={"message": "Item not found."}
output: def delete_item(item_name):
      items = ["Apple", "Banana", "Cherry"]
      if item_name in items:
          items.remove(item_name)
          return {"message": "Item successfully deleted."}
      else:
          return {"message": "Item not found."}