input: Write a python function to delete an element from a list by its index.
  assert delete([1, 2, 3, 4, 5], 2) == [1, 2, 4, 5]
  assert delete([10, 20, 30, 40, 50], 0) == [20, 30, 40, 50]
  assert delete(['a', 'b', 'c', 'd'], 3) == ['a', 'b', 'c']
output: def delete(lst, index):
      del lst[index]
      return lst