input: 
  def third_largest(lst):
      """ Given a list of integers, return the third largest element. If the list has fewer than three elements, return None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([5, 5, 4, 3, 1])
      3
      >>> third_largest([1, 2])
      None
      """
      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]
  
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]