Question 19

Which of the following method is used to move the file pointer to read the content from a specific position in a text file inside a Python program?

  1. AMove
  2. BTell
  3. CFind
  4. DSeek
Show answerHide answer

Correct answer: (D) Seek

Explanation

seek(offset) moves the file pointer to a given position. tell() only reports the current position.

From DSSSB TGT Computer Science Practice Set 4

This is question 19 of DSSSB TGT Computer Science Practice Set 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.