The position of the file pointer in a file previously opened with create( ) or open( ).

Property of

File

Description

A File object’s position property reflects the current position of the file pointer. It is a read-only property. To move the file pointer, use seek( ). Reading and writing to a file also moves the file pointer.

The position is zero-based. The first character in the file is at position zero.