python - How does readline() work behind the scenes when reading a text file? -
i understand how readline() takes in single line text file. specific details know about, respect how compiler interprets python language , how handled cpu, are: how readline() know line of text read, given successive calls readline() read text line line? is there way start reading line of text middle of text? how work respect cpu? i "beginner" (i have 4 years of "simpler" programming experience), wouldn't able understand technical details, feel free expand if others understand! example using file file.txt : fake file text in few lines question 1: how readline() know line of text read, given successive calls readline() read text line line? when open file in python, creates file object. file objects act file descriptors, means @ 1 point in time, point specific place in file. when first open file, pointer @ beginning of file. when call readline() , moves pointer forward character after next newline reads. calling tell() function o