Read position is a special value to mark the location of the next item that will be read from the file. The location has been read when the file is opened using 'r' mode. The read position is internally maintained for that "input file".
Initially, the location of the read position is set at the beginning of the input file when the file is opened.
The following code is used to demonstrate the read position in a file:
#Open an input file for reading
#Reading three lines from file
#Close the file
#Print the data
#Call the main function
Screenshot of Input file "Names.txt" :
Ask our subject matter experts your homework question and you'll be notified when it's answered.infoQuestions are typically answered within just a few hours. If your question isn't answered within 48 hours we'll credit your question back.