input: def third_largest(lst):
      """Return the third largest element from a given list of integers.
      If the list has fewer than 3 distinct elements, return None.
      >>> third_largest([12, 13, 13, 45, 22, 99])
      22
      >>> third_largest([12, 1, 5])
      1
      >>> third_largest([4])
      None
      """
      if len(lst) < 3:
          return
      distinct = []
      for i in lst:
          if i not in distinct:
              distinct.append(i)
      distinct.sort(reverse=True)
      if len(distinct) < 3:
          return
      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)
      if len(distinct) < 3:
          return None
      return distinct[2]