Formatting Floats Inside Python F-Strings - Real Python
Briefly

Since Python 3.6, the introduction of formatted string literals, or f-strings, has greatly simplified string formatting by allowing inline expressions within string definitions.
An f-string is prefixed by an 'f' or 'F' and uses braces to include variables or expressions, enabling dynamic and readable code snippets.
Before f-strings, formatting strings meant cumbersome concatenation or complex formatting functions; f-strings provide a more straightforward syntax for including calculated values directly.
F-strings not only streamline the way values are formatted into strings but also improve readability and maintainability of code, making it easier to integrate calculations.
Read at Realpython
[
|
]