0
Can someone please explain exceptions in python?
4 Réponses
+ 3
If you have your program do something, say open a file that doesn't exist, the program will crash. If you have the same program and have it "try" to open the file and if it doesn't exist it can catch the exception. instead of crashing it can do something else
0
what concretely u can't understood?
basically it's method for handing errors
0
ohh. thanks
0
An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions. In general, when a Python script encounters a situation that it cannot cope with, it raises an exception.