input: Write a function to create a REST API in Python that can be used to delete an item from a list. If the item is successfully deleted, return a JSON object with the message "Item successfully deleted." If the item does not exist in the list, return a JSON object with the message "Item not found."
  assert delete_item("Banana")=={"message": "Item successfully deleted."}
  assert delete_item("Apple")=={"message": "Item successfully deleted."}
  assert delete_item("Banana")=={"message": "Item not found."}
  assert delete_item("Grapes")=={"message": "Item not found."}
output: def delete_item(item):
      items = ["Banana", "Apple"]
      if item in items:
          items.remove(item)
          return {"message": "Item successfully deleted."}
      else:
          return {"message": "Item not found."}