Advertisements
Advertisements
प्रश्न
List the situation(s) in which the code may result in IOError?
लघु उत्तरीय
Advertisements
उत्तर
An IOError may occur when an input/output operation fails, for example:
- Opening a file that does not exist in read mode.
- Attempting to read a file without sufficient permission.
- Attempting to write to a read-only file.
- Writing when the disk is full.
- Using an invalid file path or inaccessible device.
- A hardware, network, or operating-system error during file access.
In modern Python, many such errors are represented by the more general OSError class.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
