input: Write a function to perform a linear search to find an element in a list.
  assert linear_search([1, 2, 3, 4, 5], 3) == 2
  assert linear_search([10, 20, 30, 40, 50], 40) == 3
  assert linear_search([5, 4, 3, 2, 1], 6) == -1
output: def linear_search(arr, target):
      for index, element in enumerate(arr):
          if element == target:
              return index
      return -1