input: def linear_search(arr, x):
      """
      Perform a linear search on the given list `arr` to find the index of element `x`.
      If `x` is found, return its index; otherwise, return -1.
  
      >>> linear_search([1, 2, 3, 4, 5], 3)
      2
      >>> 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