[EMAIL PROTECTED] writes: > 100 -> 100 > 1000 -> 1,000 > 1000000 -> 1,000,000 > -1000 -> -1,000
def sep(n): if n<0: return '-' + sep(-n) if n<1000: return str(n) return '%s,%03d' % (sep(n//1000), n%1000) -- http://mail.python.org/mailman/listinfo/python-list