After the first read() the file's pointer is positioned at the end of the file, so the "for line in file_object" starts at the end of the file, where there are no more records to be read. Take a look a seek() in the docs if you want to move the pointer back to the beginning of the file.
Printing from a text file not working as I thought it would
Printing from a text file not working as I thought it would
|
|
Users browsing this thread: 1 Guest(s)