TLDR · PROGRAMMING, DESIGN & DATA SCIENCE

PYTHON'S NEW T-STRINGS

davepeck.org5 min read

Summary from the TLDR newsletter

Python 3.14, which will ship in late 2025, will contain a feature called template strings (t-strings) that opens the door to safer and more flexible string processing in Python. f-strings have become a very popular way to format strings and are being used for everything - even when they shouldn't. t-strings are a generalization of f-strings that must be processed before they can be used. This post provides a quick overview of how to use the new feature.