Web Analytics

Python file.seek() Method

File Method โ€ข Seek

The seek() method sets the current file stream position.

Syntax

file.seek(offset)

Parameters

Parameter Description
offset Required. The index where the pointer should be placed.

Return Value

The new file position.

Example

Using the seek() method:

Output
Click Run to execute your code

Related Functions