Dec-28-2017, 07:07 AM
On line#10 you read the entire txt file in a variable called line. This is actually a list of lines in the file. At that point you are at the end of the file.
Next you want to iterate over the file ipfile line by line, however you are already at the end of the file, thus there is nothing left to iterate over.
To solve the problem just remove line#10 of your code. then you will iterate over the file line by line.
Next you want to iterate over the file ipfile line by line, however you are already at the end of the file, thus there is nothing left to iterate over.
To solve the problem just remove line#10 of your code. then you will iterate over the file line by line.