<filename>theory/Lesson5-Files/code/file_read_by_line.py<gh_stars>1-10
# Lesson5: reading from a file line by line
# source: code/file_read_by_line.py

f = open('file_for_reading.txt', 'r')

for line in f:
    print(line)

f.close()
<filename>theory/Lesson5-Files/code/file_read_by_line.py<gh_stars>1-10
# Lesson5: reading from a file line by line
# source: code/file_read_by_line.py

f = open('file_for_reading.txt', 'r')

for line in f:
    print(line)

f.close()
# Lesson5: reading from a file line by line # source: code/file_read_by_line.py