myfile = open('myfile', 'r') # open for inputprint myfile.readline() # read the line backprint myfile.readline() # empty string: end of filemyfile.close()