Python File readable() Method

❮ File Methods


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.


❮ File Methods

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.