Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5825cc commit 7fefaffCopy full SHA for 7fefaff
1 file changed
Doc/library/fileinput.rst
@@ -58,8 +58,9 @@ The following function is the primary interface of this module:
58
:keyword:`with` statement. In this example, *input* is closed after the
59
:keyword:`with` statement is exited, even if an exception occurs::
60
61
- with fileinput.input(files=('spam.txt', 'eggs.txt')) as input:
62
- process(input)
+ with fileinput.input(files=('spam.txt', 'eggs.txt')) as f:
+ for line in f:
63
+ process(line)
64
65
.. versionchanged:: 3.2
66
Can be used as a context manager.
0 commit comments