input: Write a python function to perform a linear search on a list and return the index of the target element.
  assert linear_search([1, 2, 3, 4, 5], 3) == 2
  assert linear_search([10, 20, 30, 40, 50], 40) == 3
  assert linear_search([7, 8, 9, 10, 11], 6) == -1
output: def linear_search(arr, target):
      for i in range(len(arr)):
          if arr[i] == target:
              return i
      return -1