"spir ☣" <denis.s...@gmail.com> wrote

Either you read line per line, but then you cannot stop exactly at the 1000th character;
or you traverse the text char per char, but this is a bit picky.

Or you could just read 1000 chars from the file then pick out the lines from that.
But that requires you to count newlines as characters! :-)

HTH,

Alan G.


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to