I have a huge file, abc.txt, and wanted to read line by line, not all at once. I can do it as below:
filename="c:\abc.txt"
with open (filename, "r") as fb:
for content in fb:
# Do something ....
Here I am not understanding one thing. As you see, "fb" is a file pointer over here. How is the "for" loop processing the pointer directly internally even without using any readline or read function?
I just wanted to know how the for
loop is working here.