input: def third_largest(lst):
      """
      Get the third largest element in a given list.
      If the list doesn't have at least three distinct elements, return None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([1, 2, 3, 4, 5, 6, 7, 8, 9])
      7
      """
      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