I tried writing the code for this question and running it. unfortunately, the output.txt document that I get from it shows only the first 4659 lines instead of all 6000+ lines which exist in the document.
if instead of writing the numbers to a file, I print it in the console (IDLE), it returns the full answer.
did this happen to anyone else? and how did you fix it?