input: Write a python function to find the index of a target element in a given list.
  assert search([1, 4, 6, 8, 10], 8) == 3
  assert search([1, 4, 6, 8, 10], 5) == -1
  assert search([1, 4, 6, 8, 10], 1) == 0
output: def search(lst, target):
      for i in range(len(lst)):
          if lst[i] == target:
              return i
      return -1