Commit f0d5ab64 authored by Ezio Melotti's avatar Ezio Melotti

#22170: avoid printing newlines twice in tutorial example.

parent 0640746d
...@@ -802,7 +802,7 @@ using a :keyword:`for` statement:: ...@@ -802,7 +802,7 @@ using a :keyword:`for` statement::
for char in "123": for char in "123":
print(char) print(char)
for line in open("myfile.txt"): for line in open("myfile.txt"):
print(line) print(line, end='')
This style of access is clear, concise, and convenient. The use of iterators This style of access is clear, concise, and convenient. The use of iterators
pervades and unifies Python. Behind the scenes, the :keyword:`for` statement pervades and unifies Python. Behind the scenes, the :keyword:`for` statement
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment