Function Details: seekable

Description


Return True if the stream supports random access.


Extended Description


The seekable() method checks whether the file stream supports random access. If True, the stream supports seek(), tell(), and truncate() operations. This is useful for determining if you can move around within the file.


Function Signature



Module: io

Class: TextIOWrapper

Parameters



Return


Returns True if the stream supports random access, False otherwise.


Return Type


bool

Output

Explanation

This example demonstrates the basic usage of seekable(). For a regular file, it will typically return True.