Read line by line
Section: Files and paths
Read line by line
python
python
with open("app.log", "r", encoding="utf-8") as f:
for line in f:
print(line.rstrip())Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Files and paths