Which of the following method is used to move the file pointer to read the…
2023
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?
- A.
move
- B.
tell
- C.
find
- D.
seek
Attempted by 1353 students.
Show answer & explanation
Correct answer: D
The seek() method moves the file pointer to a specified position in a file. Usage: file.seek(offset, whence)