input: Write a function to search for an element in an array and return its index.
  assert search([1, 2, 3, 4, 5], 3) == 2
  assert search([10, 20, 30, 40], 20) == 1
  assert search([7, 14, 21, 28], 25) == -1
output: def search(arr, target):
      for i, element in enumerate(arr):
          if element == target:
              return i
      return -1