mirror of https://github.com/python/cpython
#22170: avoid printing newlines twice in tutorial example.
This commit is contained in:
parent
41ad77c697
commit
79a1ffde9b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue