Question: Python Help: Writing a program to read from one file line by line and number it in a new file I'm writing this program and

Python Help: Writing a program to read from one file line by line and number it in a new file
I'm writing this program and I found this to work for what I want. However what does the "while line:" on line 11 do. How is the "line" variable changed so that it's not an infinite loop. I know it has to do with the line=f1.readline() on line 13. But how is that line any different than the one in line 7. Also how does it know to read the next line in the inputFile?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
