From: Ezio Melotti Date: Fri, 8 Aug 2014 14:23:32 +0000 (+0300) Subject: #22170: avoid printing newlines twice in tutorial example. X-Git-Tag: v3.4.2rc1~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79a1ffde9b3ae4b7dccdf2a64c6fc7cb7c243211;p=thirdparty%2FPython%2Fcpython.git #22170: avoid printing newlines twice in tutorial example. --- diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 6c71d80e03bb..11e07e352dfc 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -802,7 +802,7 @@ using a :keyword:`for` statement:: for char in "123": print(char) for line in open("myfile.txt"): - print(line) + print(line, end='') This style of access is clear, concise, and convenient. The use of iterators pervades and unifies Python. Behind the scenes, the :keyword:`for` statement