"Andrew Dalke" wrote: > ... > The ones I could think of are: > - insert commas in a number, as in "10000" -> "10,000" > > def commafy(s): > s = s.reverse() > terms = [] > for i in range(0, len(s), 3): > terms.append(s[i:i+3]) > return ",".join(terms).reverse() > ... For this one, I'd prefer locale.format().