How does a file reader know where one line starts and another ends?

Every line in a text file has a hidden EOL (end of line) set of characters.

Python knows how many characters to expect in a line.

The last item in a line of data does not have a comma after it.

Every line starts with a BOL (beginning of line) character.