Python File readable() Method
Example
Check if the file is readable:
f = open("demofile.txt", "r")
print(f.readable())
Run example »
Definition and Usage
The readable()
method returns
True
if the file is readable,
False
if not.
Syntax
file.readable()
Parameter Values
No parameters.