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 that can be used to delete an item from a list.
  >>> get_items()
  '["Apple", "Banana", "Orange"]'
  >>> delete_item("Banana")
  '{"message": "Item successfully deleted."}'
  >>> delete_item("Mango")
  '{"message": "Item not found."}'
  >>> get_items()
  '["Apple", "Orange"]'
  """
output:     
  @app.route('/items/<item>', methods=["PUT"])
  def update_item(item):
      new_item = request.json.get('new_item')
      if item in items:
          index = items.index(item)
          items[index] = new_item
          message = "Item successfully updated."
      else:
          message = "Item not found."
      return json.dumps({"message": message})
  
  @app.route('/items', methods=["POST"])
  def add_item():
      new_item = request.json.get('item')
      if new_item not in items:
          items.append(new_item)
          message = "Item successfully added."
      else:
          message = "Item already exists."
      return json.dumps({"message": message})
  