Report question

Question: How to read a file line by line or a whole text file at once?