What are template strings introduced in Python 3.14?
Built-in data types
Audio flashcard · 0:21Nortren·
What are template strings introduced in Python 3.14?
0:21
Template strings, called t-strings, were introduced in Python 3.14 via PEP 750. Unlike f-strings, which immediately produce a regular string, t-strings produce a Template object containing both the static parts and the interpolations. This lets you process, escape, or transform values before rendering, which is valuable for SQL, HTML, and shell command construction with proper escaping.
---
peps.python.org