Richard Kessler <[EMAIL PROTECTED]> writes: > I am relatively new to Python. Love it, but I find things that I > can do easily in .NET and cannot find a way to do in Python. I need > to format a number as currency, for example 12343.56 to $12,343.56. > > In C# all I need to do is decimal x = 12343.56 then > x.ToString("$###,###.00");
Rather than implement a custom format, Python provides the 'locale' module to handle locale-specific things like digit-grouping. <URL:http://docs.python.org/lib/module-locale> -- \ "About four years ago, I was -- no, it was yesterday." -- | `\ Steven Wright | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list