KnowledgeBoat Logo

Computer Science

Which of the following functions changes the position of file pointer and returns its new position?

  1. flush()
  2. tell()
  3. seek()
  4. offset()

Python File Handling

1 Like

Answer

seek()

Reason — The seek() function in Python is utilised to relocate the file pointer within a file to a specific position. It also accepts an optional second argument, which denotes the starting point for determining this new position.

Answered By

2 Likes


Related Questions