fileinput
Stdlib — OS/FilePython 2.0+Intermediate
Iterate over lines from multiple input streams or files
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
- Dependencies
- None — Python Standard Library
- Install
Included with Python
Learn by Difficulty
Quick Example
python
import fileinput print(f"Module: fileinput") print(f"Contents: {dir(fileinput)[:10]}")
The fileinput module is part of Python's standard library. Iterate over lines from multiple input streams or files.
Try in PlaygroundTags
stdlibfile-iosystem