input: Write a function to manage a to-do list with add, edit, delete and print functionalities.
  assert todo.add("Buy groceries") is None
  assert todo.add("Read a book") is None
  assert todo.tasks == ["Buy groceries", "Read a book"]
  assert todo.edit(0, "Buy food") is None
  assert todo.tasks == ["Buy food", "Read a book"]
  assert todo.delete(1) is None
  assert todo.tasks == ["Buy food"]
  assert todo.print() is None
output: class ToDoList:
      def __init__(self):
          self.tasks = []
  
      def add(self, task):
          self.tasks.append(task)
  
      def edit(self, index, new_task):
          if 0 <= index < self.tasks.length:
              self.tasks[index] = new_task
  
      def delete(self, index):
          if 0 <= index < self.tasks.length:
              self.tasks.pop(index)
  
      def print(self):
          for task in self.tasks:
              print(task)
  
  todo = ToDoList()