English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
readable() This method is used to check if the file is readable.
readable() syntax is as follows:
fileObject.readable();
No parameters.
If the file is readable, the readable() method returns True, otherwise it returns False.
The following example demonstrates the use of the readable() method:
f = open("w3codebox.txt, "r") print(f.readable())
The output result of the above example is as follows:
True