KnowledgeBoat Logo

Computer Science

Which statement is used to retrieve the current position within the file?

  1. fp.seek()
  2. fp.tell()
  3. fp.loc
  4. fp.pos

Python Data Handling

1 Like

Answer

fp.tell()

Reason — The tell() method returns the current position of the file read/write pointer within the file. The correct syntax to use it is fp.tell(). Therefore, the correct statement used to retrieve the current position within the file is fp.tell().

Answered By

1 Like


Related Questions