Python Read from Text File
Code:# This code snippet was taken from freecodesnippets.com myfile = open(myfile, r) # open for input print myfile.readline() # read the line back print myfile.readline() # empty string: end of file myfile.close()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks