input: Write a python function to delete an element from a list given its index.
  assert delete_element([2, 3, 5, 8], 2) == [2, 3, 8]
  assert delete_element([10, 20, 30, 40, 50], 0) == [20, 30, 40, 50]
  assert delete_element([1, 2, 3, 4, 5], 4) == [1, 2, 3, 4]
output: def delete_element(lst, index):
      if 0 <= index < len(lst):
          del lst[index]
      return lst