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/stdlib2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Doc/tutorial/stdlib2.rst') diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst index 459d765376..ed4c876880 100644 --- a/Doc/tutorial/stdlib2.rst +++ b/Doc/tutorial/stdlib2.rst @@ -116,7 +116,7 @@ placeholders such as the current date, image sequence number, or file format:: >>> for i, filename in enumerate(photofiles): ... base, ext = os.path.splitext(filename) ... newname = t.substitute(d=date, n=i, f=ext) - ... print '%s --> %s' % (filename, newname) + ... print '{0} --> {1}'.format(filename, newname) img_1074.jpg --> Ashley_0.jpg img_1076.jpg --> Ashley_1.jpg -- cgit v1.2.1