See the locale module.

This does currency (and date) formatting.

>>> import locale
>>> locale.setlocale( locale.LC_ALL, '' )
'English_United States.1252'
>>> locale.currency( 188518982.18 )
'$188518982.18'
>>> locale.currency( 188518982.18, grouping=True )
'$188,518,982.18'
Answer from S.Lott on Stack Overflow
๐ŸŒ
Jerry Ng
jerrynsh.com โ€บ 3-useful-python-f-string-tricks-you-probably-dont-know
3 Useful Python F-string Tricks You Probably Donโ€™t Know
August 3, 2021 - Format float type variable as a pretty-looking currency. Simple! Besides using it to format float type variables, we can even use f-string along with datetime type variable.
๐ŸŒ
VDCI
vdci.edu โ€บ formatting numbers with python: using apply and lambda
Formatting Numbers with Python: Using Apply and Lambda - Free Video Tutorial
May 4, 2025 - Create a reusable format_currency function using f-strings and include commas to convert numeric values into properly formatted dollar amounts (e.g., $50,000,000).
๐ŸŒ
Real Python
realpython.com โ€บ python-f-strings
Python's F-String for String Interpolation and Formatting โ€“ Real Python
November 30, 2024 - They provide some string formatting ... 35)) Name: John Age: 35 ยท In the first example, you use the %.2f conversion specifier to represent currency values....
๐ŸŒ
The Python Coding Stack
thepythoncodingstack.com โ€บ the python coding stack โ€บ the curious little shop at the end of my street โ€ข python's f-strings
The Curious Little Shop at The End of My Street โ€ข Python's f-strings
June 25, 2024 - The dollar sign replaced the pound currency sign, and the expression in the second pair of curly brackets now includes two variable names and the multiplication operator: price * gbp_usd.
๐ŸŒ
Marketcalls
marketcalls.in โ€บ home โ€บ mastering python f-string formatting: a traderโ€™s guide
Mastering Python F-String Formatting: A Traderโ€™s Guide
November 15, 2023 - Trading involves dealing with a lot of data, including prices, volumes, dates, and percentages. F-strings allow traders to format this data succinctly and clearly in their Python scripts or Jupyter notebooks.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ python_string_formatting.asp
Python String Formatting
Before Python 3.6 we had to use the format() method. F-string allows you to format selected parts of a string.
Find elsewhere
๐ŸŒ
Replit
replit.com โ€บ home โ€บ discover โ€บ how to format a number as currency in python
How to format a number as currency in Python | Replit
For more details on looping through dictionaries, see our comprehensive guide. Inside the loop, an f-string dynamically combines the symbol with the formatted number, producing a clean output for each currency.
๐ŸŒ
Real Python
realpython.com โ€บ how-to-python-f-string-format-float
How to Format Floats Within F-Strings in Python โ€“ Real Python
April 24, 2024 - Note: When you define a format using the form ".2e", you are using a similar, but not identical, formatting language to the language used by the more modern format specifiers. This time, you are using old-style printf-style string formatting. If you want to display currencies, you can use the locale.currency() function:
๐ŸŒ
DNMTechs
dnmtechs.com โ€บ currency-formatting-in-python-3-simplified-guide
Currency Formatting in Python 3: Simplified Guide โ€“ DNMTechs โ€“ Sharing and Storing Technology Knowledge
This will output the formatted currency value as โ€œ$1,234.56โ€. The โ€œ:,.2fโ€ specifier inside the f-string formats the value as a float with two decimal places and comma as the thousands separator. In this simplified guide, we explored different methods to format currency values in Python 3.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-format-numbers-as-currency-strings-in-python
How to format numbers as currency strings in Python - GeeksforGeeks
July 23, 2025 - Formatting numbers as currency strings in Python involves presenting numeric values in the standardized currency format typically including the currency symbol, thousands separators and the number of the decimal places.
๐ŸŒ
ZetCode
zetcode.com โ€บ python โ€บ fstring
Python f-string - formatting strings in Python with f-string
May 11, 2025 - Beyond basic formatting, f-strings enable advanced operations such as inline calculations, function calls, and even conditional expressions. This versatility makes them suitable for a wide range of applications in Python development, from constructing log messages to formatting financial data.
๐ŸŒ
Python Guides
pythonguides.com โ€บ format-decimal-places-in-python-using-f-strings
How To Format Decimal Places In Python Using F-Strings?
March 19, 2025 - As a developer working on numerous projects across the USA, I recently faced an issue where I needed to format currency values with a specific number of decimal places for our financial reports. After researching various string formatting techniques, I found that using f-strings is an efficient and readable way to format decimal places. I will help you learn how to format decimal places in Python using f-strings in this tutorial with examples.
๐ŸŒ
AskPython
askpython.com โ€บ home โ€บ fixed digits after decimal with f-string
Fixed digits after decimal with F-string - AskPython
May 31, 2023 - Letโ€™s see the example to understand the working of the f-string model. ... In this syntax, the value contains the number with a decimal point. After โ€˜.โ€™, we need to define the number of fixed digits we want to print after the decimal point, followed by the โ€˜fโ€™ letter. Value = 'Askpython' print(f"you can learn Python from {Value}.com")
๐ŸŒ
Unstop
unstop.com โ€บ home โ€บ blog โ€บ f-string in python | syntax, usage & more (+code examples)
f-string In Python | Syntax, Usage & More (+Code Examples)
January 13, 2025 - Currency Symbol: โ‚น is added directly into the string for context. The f-strings work well with Pythonโ€™s datetime module, allowing you to format dates and times for better readability.
๐ŸŒ
datagy
datagy.io โ€บ home โ€บ python posts โ€บ python f-strings: everything you need to know!
Python f-strings: Everything you need to know! โ€ข datagy
December 20, 2022 - F-strings can also be used to apply number formatting directly to the values. Python can take care of formatting values as percentages using f-strings.
๐ŸŒ
PyPI
pypi.org โ€บ project โ€บ multicurrency
multicurrency ยท PyPI
March 26, 2021 - # Using the `f-string` method >>> from multicurrency import Euro >>> euro = Euro(1000000*(1/7)) >>> f'{euro:4%a}' '142.857,1429' Some more examples of the Currency formatting feature usage (using the f-string method):
      ยป pip install multicurrency
    
Version ย  2.1.0
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ how to format money, so 100 becomes 1.00, not 100.00, 1000 becomes 10.00, not 1,000.00
r/learnpython on Reddit: How to format money, so 100 becomes 1.00, not 100.00, 1000 becomes 10.00, not 1,000.00
January 4, 2019 -

I am trying to write a small program with stripe API to get the charges, and I don't have to log in to the dashboard often. While I can get all data, stripe outputs the money unformatted without any decimals.

"data": [ { "amount": 6880,

but this is $68.80 is it possible I can convert the 6880 into $68.80? here is their API