Skip to content

Commit a2003bd

Browse files
[3.13] gh-110383: Improve 'old string formatting' text in tutorial (GH-120219) (#120229)
(cherry picked from commit 225aab7) Co-authored-by: Erlend E. Aasland <erlend@python.org>
1 parent f0165d0 commit a2003bd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Doc/tutorial/inputoutput.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,11 @@ left with zeros. It understands about plus and minus signs::
279279
Old string formatting
280280
---------------------
281281

282-
The % operator (modulo) can also be used for string formatting. Given ``'string'
283-
% values``, instances of ``%`` in ``string`` are replaced with zero or more
284-
elements of ``values``. This operation is commonly known as string
282+
The % operator (modulo) can also be used for string formatting.
283+
Given ``format % values`` (where *format* is a string),
284+
``%`` conversion specifications in *format* are replaced with
285+
zero or more elements of *values*.
286+
This operation is commonly known as string
285287
interpolation. For example::
286288

287289
>>> import math

0 commit comments

Comments
 (0)