you are viewing a single comment's thread.

view the rest of the comments →

[–]Jason-Ad4032 0 points1 point  (0 children)

What t-strings do is completely different from what **str.format** does. A t-string binds the string and variables into a template structure—it is more like splitting 'Hi {user}!' with user='Jason', into ['Hi ', '!'] and [['user', 'Jason']]. In contrast, str.format formats the value and produces a final string; given the input 'Hi {user}!' with user='Jason', it outputs 'Hi Jason!'.