[prog] currency formatting in python

Shuying Wang shuying at gmail.com
Mon May 16 12:20:53 EST 2005


Hi.

How do I format a numeric like 123345.23 into $123,345.23 in python?
I've tried locale.format("$%'.2f", 123456.23, True) but I get the
error "unsupported format character".

Thanks for any help,
Shuying


More information about the Programming mailing list