Python File seekable() Method
Example
Check if the file is seekable:
f = open("demofile.txt", "r")
print(f.seekable())
Run example »
Definition and Usage
The seekable()
method returns
True
if the file is seekable,
False
if not.
A file is seekable if it allows access to the file stream, like the
seek()
method.
Syntax
file.seekable()
Parameter Values
No parameters.