input: Write a python function to perform a linear search to find the index of a given key in a list.
  assert linear_search([1, 2, 3, 4, 5], 3) == 2
  assert linear_search([10, 20, 30, 40], 20) == 1
  assert linear_search([5, 6, 7, 8, 9], 10) == -1
output: def linear_search(lst, key):
      for index, value in enumerate(lst):
          if value == key:
              return index
      return -1