input: Write a python function to search for an element in a list and return its index using a for loop.
  assert search_list([1, 2, 3, 4, 5], 3) == 2
  assert search_list(['a', 'b', 'c', 'd'], 'c') == 2
  assert search_list([10, 20, 30, 40], 25) == -1
output: def search_list(lst, element):
      for index in range(len(lst)):
          if lst[index] == element:
              return index
      return -1