How to Format Floats Within F-Strings in Python - Real Python
Briefly

Since Python 3.6, f-strings allow for customizable string content with expressions enclosed in curly braces, facilitating dynamic content within strings.
F-strings enable runtime evaluation, permitting different data to be passed into replacement fields for varied output, replacing older rounding and formatting techniques.
While f-strings simplify string formatting, they can be vulnerable to SQL injection attacks if rogue commands are passed within the f-string for database manipulation.
Python 3.12 addressed limitations in earlier versions of f-strings, enhancing their functionality and security features in string interpolation.
Read at Realpython
[
add
]
[
|
|
]