Given to you below is a read_lines()
function which takes in a filename and returns its hypothetical contents. While the contents of this file are small, there might be instances where the file contents are extremely large. We need to read such files efficiently.
Your task is to modify the read_lines()
function to yield each line of the file as needed. Split the data
string by lines and yield every line to the caller.