A file iterator : Loop through : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Loop through »

 

A file iterator


filename = raw_input('Enter file name: ')
f = open(filename, 'r')
for eachLine in f:
    print eachLine,
f.close()



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo File
» Loop through