input: Write a function to create a REST API in Python that can be used to delete an item from a list. The function should define a Flask app with a route to delete an item and another route to get the list of items. The function should use the Flask framework and handle both GET and DELETE requests appropriately.
  
  from flask import Flask, request
  import json
  
  def create_delete_item_api():
   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})
  
   return app
  
  assert create_delete_item_api().delete_item("Banana")["message"] == "Item successfully deleted."
  assert create_delete_item_api().delete_item("Grape")["message"] == "Item not found."
output: 
  def create_delete_item_api():
   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})
  
   return app
  