input: Write a function to create a Python REST API that allows deleting an item from a list. The function should implement a Flask application with a route to delete an item by its name. If the item is found and deleted, it should return a success message. If the item is not found, it should return a not found message.
  from flask import Flask, request
  import json
  
  app = Flask(__name__)
  items = ["Apple", "Banana", "Orange"]
  
  @app.route('/items', methods=["GET"])
  def get_items():
   return json.dumps(items)
  
  @app.route('/items/<item>', methods=["DELETE"])
  def delete_item(item):
   if item in items:
    items.remove(item)
    message = "Item successfully deleted."
   else:
    message = "Item not found."
   return json.dumps({"message": message})
output: 
  @app.route('/items/<item>', methods=["DELETE"])
  def delete_item(item):
   if item in items:
    items.remove(item)
    message = "Item successfully deleted."
   else:
    message = "Item not found."
   return json.dumps({"message": message})
  