Looping through the file, line by line. : Text File Read : File PYTHON examples


PYTHON examples » File » Text File Read »

 

Looping through the file, line by line.




print "nLooping through the file, line by line."
text_file = open("read_it.txt""r")
for line in text_file:
    print line
text_file.close()

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo File
» Text File Read