input: 
  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})
  
  """
  Create a REST API in Python using Flask that allows for deleting an item from a list.
  >>> app.test_client().delete('/items/Banana').get_json()
  {"message": "Item successfully deleted."}
  >>> app.test_client().delete('/items/Pineapple').get_json()
  {"message": "Item not found."}
  """
  
output:     
  @app.route('/items/<item>', methods=["POST"])
  def add_item(item):
   if item not in items:
    items.append(item)
    message = "Item successfully added."
   else:
    message = "Item already exists."
   return json.dumps({"message": message})
  