input: from typing import List
  
  def linear_search(arr: List[int], x: int) -> int:
      """ Search for an element x in a list arr using linear search algorithm.
      >>> 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