input: 
  def third_largest(lst):
      """ Get the third largest element from a given list. If the list has less than 3 distinct elements, return None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([10, 20, 30, 40, 50])
      30
      """
      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(distinct) < 3:
          return None