gh-110383: Improve 'old string formatting' text in tutorial (#120219)

This commit is contained in:
Erlend E. Aasland 2024-06-07 15:37:18 +02:00 committed by GitHub
parent eca3f7762c
commit 225aab7f70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -279,9 +279,11 @@ left with zeros. It understands about plus and minus signs::
Old string formatting Old string formatting
--------------------- ---------------------
The % operator (modulo) can also be used for string formatting. Given ``'string' The % operator (modulo) can also be used for string formatting.
% values``, instances of ``%`` in ``string`` are replaced with zero or more Given ``format % values`` (where *format* is a string),
elements of ``values``. This operation is commonly known as string ``%`` conversion specifications in *format* are replaced with
zero or more elements of *values*.
This operation is commonly known as string
interpolation. For example:: interpolation. For example::
>>> import math >>> import math