I have a rather large text file. I have about 40 million unique alpha numeric codes in it. I know how to write to files and read the whole thing. But not specify how many lines to read instead of contectsOf.
To elaborate, my file goes like this.
AF3D1
D8U9X
5GN11
.... and so on for 40 million strings.
I just just want to loop through for X amount of strings and write to one file, then rewrite the remaining codes over the others since I am ultimately deleting them out. I just need to figure out how to loop through X amount of a txt file.
I know there is this question, but not the same. Read and write data from text file