input: Write a function to implement a REST API in Python that allows users to delete an item from a list. The function should use Flask to create the API, and should provide a route for listing all items and a route for deleting a specific item. If the item to be deleted is not found, the function should return a message indicating so. If the item is successfully deleted, the function should return a success message. If no items are present in the list, the function should return an empty list.
  from flask import Flask, request
  import json
  
  app = Flask(__name__)
  items = []
  
  @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', 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})
  