Write your question here.
I am trying to create a file splitter that reads a file and split it into three files (one.txt, two.txt and three.txt) with five records each but when I run this I get weird filesnames with incorrect or no content.
Can anybody have a look and tell what am I doing wrong?
Without having tried this, you need to set line_counter = 0 again at the end of the outermost while-loop. Also, file-counter should be initialized to 0.