input: from typing import List
  
  
  def third_largest(lst: List[int]) -> int:
      """ Get the third largest element from a given list of integers.
      If the list has fewer than three distinct elements, return None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([1, 1, 1, 1, 1, 1])
      None
      >>> third_largest([5, 5, 4, 3, 2, 1])
      3
      """
      if len(lst) < 3:
          return None
      distinct = []
      for i in lst:
          if i not in distinct:
              distinct.append(i)
      distinct.sort(reverse=True)
      return distinct[2] if len(distinct) > 2 else None
output:     if len(lst) < 3:
          return None
      distinct = []
      for i in lst:
          if i not in distinct:
              distinct.append(i)
      distinct.sort(reverse=True)
      return distinct[2] if len(distinct) > 2 else None