input: 
  def third_largest(lst):
      """Return the third largest element in a given list.
      If the list has fewer than 3 distinct elements, return None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([5, 8, 2, 5, 8, 2])
      2
      """
      if len(lst) < 3:
          return
      distinct = []
      for i in lst:
          if i not in distinct:
              distinct.append(i)
      distinct.sort(reverse=True)
      return distinct[2] if len(distinct) >= 3 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) >= 3 else None