Python 3.14's new template string feature

preview_player
Показать описание
Python has long had the "f-string" feature, for creating formatted strings from variable data. Now, with Python 3.14, there's a "template string" type — an f-string-like construction which gives you far more control over how the data is formatted and outputted. In this example we show how t-strings (as they're called) can be used to create templates that safely format text for HTML output.

------------------------------­----
Рекомендации по теме
Комментарии
Автор

I’m a beginner. Is there a prerequisite, or history, to help me understand the use case better?

jsizemo
join shbcf.ru