Reading the newly created file. : Text File Write « File « Python






Reading the newly created file.

Reading the newly created file.


print "\nReading the newly created file."
text_file = open("write_it.txt", "r")
print text_file.read()
text_file.close()


           
       








Related examples in the same category

1.Demonstrates writing to a text fileDemonstrates writing to a text file
2.Creating a text file with the writelines() method.Creating a text file with the writelines() method.
3.Write string to a file