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