input: Write a function to get the third largest element in a given list. If the list has fewer than three distinct elements, return None.
  assert third_largest([12, 13, 13, 45, 22, 99])==22
  assert third_largest([5, 5, 5, 5, 5, 5])==None
  assert third_largest([1, 2])==None
  assert third_largest([1, 10, 2, 3, 4, 5])==4
  assert third_largest([9, 3, 2, 7, 5, 8])==7
output: def third_largest(lst):
      distinct_elements = list(set(lst))
      if len(distinct_elements) < 3:
          return None
      distinct_elements.sort(reverse=True)
      return distinct_elements[2]