#strformat

[ follow ]
Realpython
7 months ago
Python

Python's Format Mini-Language for Tidy Strings - Real Python

String interpolation is a common task when working with strings in Python, and there are three popular tools for it: the modulo operator, str.format() method, and f-strings.
Replacement fields, delimited by curly braces, are used in both str.format() and f-strings to dynamically insert values into strings. [ more ]
[ Load more ]