input: def optimize_linear_search(arr, x):
      """
      Optimize the given linear search function using best practices. 
      The function should return the index of the element 'x' in the list 'arr'.
      If 'x' is not found, return -1.
      
      >>> 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