input: def optimize_linear_search(arr, x):
      """
      Optimized version of linear_search using python's enumerate for better readability.
  
      >>> optimize_linear_search([1, 2, 3, 4, 5], 3)
      2
      >>> optimize_linear_search([1, 2, 3, 4, 5], 6)
      -1
      """
      for index, item in enumerate(arr):
          if item == x:
              return index
      return -1
output:     for index, item in enumerate(arr):
          if item == x:
              return index
      return -1