read line by line : Readline : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Readline »

 

read line by line


f = open(r'c:test.txt')
for i in range(3):
        print str(i': ' + f.readline(),
f.close()



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo File
» Readline