input: 
  def linear_search_improved(arr: list, x: any) -> int:
      """Improves the given linear search code by using the enumerate function, which 
      provides both value and index directly within the loop. This eliminates the need 
      to manually index the array.
      >>> linear_search_improved([10, 20, 80, 30, 60, 50, 110, 100, 130, 170], 110)
      6
      >>> linear_search_improved([10, 20, 80, 30, 60, 50, 110, 100, 130, 170], 200)
      -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