input: def optimize_linear_search(arr, x):
      """ Optimize the linear search algorithm using best practices such as enumerate for better readability and performance.
      >>> optimize_linear_search([1, 2, 3, 4, 5], 3)
      2
      >>> optimize_linear_search([1, 2, 3, 4, 5], 6)
      -1
      """
output:     for i, value in enumerate(arr):
          if value == x:
              return i
      return -1