input: def linear_search(arr, x):
      """
      Perform a linear search to find the index of element x in the list arr.
      If x is found, return its index. If x is not found, return -1.
      >>> linear_search([1, 2, 3, 4, 5], 3)
      2
      >>> linear_search([1, 2, 3, 4, 5], 6)
      -1
      """
output:     for i in range(len(arr)):
          if arr[i] == x:
              return i
      return -1