input: Write a function to search for a number in an array and return its index.
  assert search_in_array([1, 2, 3, 4, 5], 3) == 2
  assert search_in_array([10, 20, 30, 40, 50], 40) == 3
  assert search_in_array([7, 8, 9, 10], 6) == -1
output: def search_in_array(arr, target):
      try:
          return arr.index(target)
      except ValueError:
          return -1