Worth noting that f-strings can be parametrized with double braces. The inner brace is evaluated (firstly) as an expression and it's result (RHS) value is (secondly) inserted into the f-string functionality (as noted in the docs). i.e. to specify the decimal places as: for i in range(3): print(f'{1.002:,.{i}f}') > 1 > 1.0 > 1.00 and More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.