How to Open a File : Member in : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Member in »

 

How to Open a File


filename = 'file.txt'
fobj = open(filename, 'r')
for eachLine in fobj:
   print eachLine,
fobj.close()



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo File
» Member in