input: Write a function to create a REST API in Python using Flask that allows deleting an item from a list. The function should include a route for getting all items and a route for deleting a specific item. If the item to be deleted is found in the list, it should remove it and return a success message; otherwise, it should return a message indicating that the item was not found.
  from flask import Flask, request
  import json
  
  def create_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 delete_item("Apple")==json.dumps({"message": "Item successfully deleted."})
  assert delete_item("Grape")==json.dumps({"message": "Item not found."})
  assert get_items()==json.dumps(["Banana", "Orange"])
output: 
  def create_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
  