input: from typing import List, Any
  
  def linear_search(arr: List[Any], x: Any) -> int:
      """
      Perform a linear search to find the index of an element in a list.
      Return -1 if the element is not found in the list.
      >>> linear_search([1, 2, 3, 4, 5], 3)
      2
      >>> linear_search(['a', 'b', 'c'], 'd')
      -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