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?

  1. A.

    move

  2. B.

    tell

  3. C.

    find

  4. 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)

Explore the full course: Rssb Senior Computer Instructor