input: Write a function to create a REST API in Python that can be used to delete an item from a list. The API includes a GET endpoint that returns the current list of items and a DELETE endpoint that takes an item as a path parameter and deletes it from the list if it exists. If the item does not exist, the endpoint returns a message indicating the item was not found.
  assert delete_item("Banana")==json.dumps({"message": "Item successfully deleted."})
  assert delete_item("Grape")==json.dumps({"message": "Item not found."})
output: def delete_item(item):
      items = ["Apple", "Banana", "Cherry"]
      if item in items:
          items.remove(item)
          return json.dumps({"message": "Item successfully deleted."})
      else:
          return json.dumps({"message": "Item not found."})