The interpolation operator %
is used to do simple positional formatting:
>>> name = 'Bob'
>>> 'Hello, %s' % name
"Hello, Bob"
In this lesson, you’ll learn how to use %
to format strings as well as the different format specifiers you can use to generate nicely formatted output.
Patricio Urrutia on June 10, 2020
Hi, thanks for the course!
What do you mean with Legacy Code?