input: def optimize_linear_search(arr: List[int], x: int) -> int:
      """ Optimize the given linear search function using best practices.
      The function should search for an element 'x' in the list 'arr' and 
      return its index if found, else return -1.
      >>> optimize_linear_search([1, 2, 3, 4, 5], 3)
      2
      >>> optimize_linear_search([1, 2, 3, 4, 5], 6)
      -1
      """
output:     for i in range(len(arr)):
          if arr[i] == x:
              return i
      return -1