locale module

suggest change

Formatting currency. The strings come from the current user's locale, so another machine can differ:

import locale

locale.setlocale(locale.LC_ALL, '')
Out[2]: 'English_United States.1252'

locale.currency(762559748.49)
Out[3]: '$762559748.49'

locale.currency(762559748.49, grouping=True)
Out[4]: '$762,559,748.49'

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents