Skip to content
Advertisement

Currency formatting in Python

I am looking to format a number like 188518982.18 to £188,518,982.18 using Python.

How can I do this?

Advertisement

Answer

See the locale module.

This does currency (and date) formatting.

JavaScript
Advertisement