Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

formatting currencies with Python

I would like to format integers as professional looking currency strings. For example:

1200000 -> $1.2 million
456 -> $456.00

Do you know a good library for this, ideally with localization to handle European formats.

like image 930
hoju Avatar asked Dec 14 '25 12:12

hoju


1 Answers

locale.currency() can handle the number bits, but I've not seen a module for the word part.

like image 148
Ignacio Vazquez-Abrams Avatar answered Dec 16 '25 01:12

Ignacio Vazquez-Abrams



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!