From f9ef9881d778fc5a5889ac36d77b204eab4d7b4e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 26 May 2008 00:54:22 +0000 Subject: update the tutorial to use str.format --- Doc/tutorial/datastructures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Doc/tutorial/datastructures.rst') 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. -- cgit v1.2.1