mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
alternate -> alternative.
This commit is contained in:
parent
7268e9d1ff
commit
5d242eef74
2 changed files with 2 additions and 2 deletions
|
|
@ -250,7 +250,7 @@ having to load the entire file in memory. Only complete lines will be returned.
|
|||
>>> f.readlines()
|
||||
['This is the first line of the file.\n', 'Second line of the file\n']
|
||||
|
||||
An alternate approach to reading lines is to loop over the file object. This is
|
||||
An alternative approach to reading lines is to loop over the file object. This is
|
||||
memory efficient, fast, and leads to simpler code::
|
||||
|
||||
>>> for line in f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue