input: Write a function to perform a linear search in an array.
  assert linear_search([3, 4, 10, 15, 23, 42], 10) == 2
  assert linear_search([3, 4, 10, 15, 23, 42], 23) == 4
  assert linear_search([3, 4, 10, 15, 23, 42], 5) == -1
output: def linear_search(arr, target):
      for index, value in enumerate(arr):
          if value == target:
              return index
      return -1