Though easy and elegant to use, Python f-strings can be vulnerable to injection attacks when used to construct shell commands, SQL queries, HTML snippets and similar (for example, os.system(f"echo {message_from_user}")). This PEP introduces template lit...| Python Enhancement Proposals (PEPs)
Python supports multiple ways to format text strings. These include %-formatting 1, str.format() 2, and string.Template 3. Each of these methods have their advantages, but in addition have disadvantages that make them cumbersome to use in practice. This...| Python Enhancement Proposals (PEPs)
Source code: Lib/string.py String constants: The constants defined in this module are: Custom String Formatting: The built-in string class provides the ability to do complex variable substitutions ...| Python documentation