Curso_Intensivo_de_PYTHON/chapter_10/file_reader.py

8 lines
145 B
Python
Raw Permalink Normal View History

2023-06-02 17:22:53 +02:00
filename = 'pi_digits.txt'
with open(filename) as file_object:
lines = file_object.readlines()
for line in lines:
print(line.rstrip())