Advertisements
Advertisements
प्रश्न
When are the following built-in exceptions raised? Give examples to support your answer.
IOError
टिप्पणी लिखिए
Advertisements
उत्तर
It is raised when the file specified in a program statement cannot be opened.
>>> f = open("abc.txt",'r')
Traceback (most recent call last):
File "", line 1, in
f = open("abc.txt",'r')
FileNotFoundError: [Errno 2] No such file or directory: 'abc.txt'shaalaa.com
Built-in Exceptions in Python
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
