I\'m trying to repeatedly go through a text file of a few lines. When my for loop is done with one pass through the file, I want to repeat the file from the beg
When you read the file, a pointer is set to the end of the file. To go back to the beginning of the file you reset the pointer by doing "infile.seek(0)" If you want to go to the end of the file you pass 2 as the argument.