Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Read A File Line By Line In Python

You can just use the file handle with a for loop.

python3
for file in source_files:
    with open(file) as _file:
        for line if _file:
            print(line)