summaryrefslogtreecommitdiff
path: root/Doc/tutorial/datastructures.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-26 00:54:22 +0000
committerBenjamin Peterson <benjamin@python.org>2008-05-26 00:54:22 +0000
commitf9ef9881d778fc5a5889ac36d77b204eab4d7b4e (patch)
tree112e7bde302cf1b3eb7ff057d201d88e5a67f8b0 /Doc/tutorial/datastructures.rst
parentc15205e93957b3bef18f317a480f8b99213d4870 (diff)
downloadcpython-git-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.tar.gz
update the tutorial to use str.format
Diffstat (limited to 'Doc/tutorial/datastructures.rst')
-rw-r--r--Doc/tutorial/datastructures.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index 7ecb049b0f..fa71870249 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -550,7 +550,7 @@ with the :func:`zip` function. ::
>>> questions = ['name', 'quest', 'favorite color']
>>> answers = ['lancelot', 'the holy grail', 'blue']
>>> for q, a in zip(questions, answers):
- ... print 'What is your %s? It is %s.' % (q, a)
+ ... print 'What is your {0}? It is {1}.'.format(q, a)
...
What is your name? It is lancelot.
What is your quest? It is the holy grail.