code: def format_(num, n=8):
      
      if num is None:
          return 'None'
      if util_type.is_float(num):
          ret = ('%.' + str(n) + 'E') % num
          exp_pos  = ret.find('E')
          exp_part = ret[(exp_pos + 1):]
          exp_part = exp_part.replace('+', '')
          if exp_part.find('-') == 0:
              exp_part = '-' + exp_part[1:].strip('0')
          exp_part = exp_part.strip('0')
          if len(exp_part) > 0:
              exp_part = 'E' + exp_part
          flt_part = ret[:exp_pos].strip('0').strip('.')
          ret = flt_part + exp_part
          return ret
      return '%d' % num
docs: makes numbers pretty e.g.
          nums = [9001, 9.053]
          print([format_(num) for num in nums])