1.

_______________________ exceptions are raised as a result of an error in opening a particular file.(a) ValueError(b) TypeError(c) ImportError(d) IOErrorThis question was addressed to me in an online interview.Origin of the question is Exception Handling in chapter Classes and Objects, Inheritance, Polymorphism, Encapsulation and Exception Handling of Python

Answer»

Correct answer is (d) IOERROR

Easiest EXPLANATION - IOError exceptions are RAISED as a result of an ERROR in opening or CLOSING a particular file.



Discussion

No Comment Found

Related InterviewSolutions