[Solved] How to run something on each line of txt file?
[ad_1] You can use a for loop: for i,line in enumerate(textFile): #code to run on each line Where line is the value of the current line in the loop and i is the line number so let’s say your text file was: John Doe Then the for loop would be: i as 0 line as … Read more