Reading the entire file at once : Text File Read : File PYTHON examples


PYTHON examples » File » Text File Read »

 

Reading the entire file at once





print "nReading the entire file at once."
text_file = open("read_it.txt""r")
whole_thing = text_file.read()
print whole_thing
text_file.close()


           
       



Leave a Comment / Note


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


PYTHON examples

 Navioo File
» Text File Read