input: Write a function that implements a REST API in Python to delete an item from a list. The REST API should include a GET route to display the current list of items and a DELETE route to remove a specified item from the list. If the item is successfully deleted, it should return a success message. If the item is not found, it should return an error message. Ensure the function is properly tested with assertions.
  
  
  assert delete_item("Banana") == json.dumps({"message": "Item successfully deleted."})
  assert delete_item("Grape") == json.dumps({"message": "Item not found."})
  assert get_items() == json.dumps(["Apple", "Orange"])
  
output: def delete_item(item_name):
      global items
      if item_name in items:
          items.remove(item_name)
          return json.dumps({"message": "Item successfully deleted."})
      else:
          return json.dumps({"message": "Item not found."})
  
  def get_items():
      global items
      return json.dumps(items)