Now that I understand what you want - for b in range(120): print '%0*i' % (max(2,int(math.log10(b))), b) -- Bob Gailer 919-636-4239 Chapel Hill NC