input: def third_largest(lst):
      """ Return the third largest element in a given list of numbers.
      If there are less than 3 distinct elements, return None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([1, 2, 3])
      1
      """
output:     if len(lst) < 3:
          return None
      unique_elements = list(set(lst))
      unique_elements.sort(reverse=True)
      if len(unique_elements) < 3:
          return None
      return unique_elements[2]