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?
Answer: D. seek — The seek() method moves the file pointer to a specified position in a file. Usage: file.seek(offset, whence)
- A.
move
- B.
tell
- C.
find
- D.
seek
Attempted by 1564 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)
Loading lesson…