Paul Rubin wrote: > "To iterate is human; to recurse, divine": > > def commafy(n): > if n < 0: return '-' + commafy(-n) > if n >= 1000: return '%s,%03d' % (commafy(n//1000), n % 1000) > return '%s'% n > > I don't like the locale solution because of how messy locales are.
That's a keeper! Thanks! rd -- http://mail.python.org/mailman/listinfo/python-list