+ 1
Can I place the finally block before except block ?
Means if I don't want any type of error then can I remove the exception suite and just type the finally block
2 Réponses
+ 2
You should place those statements in this block that must be executed always. ... In normal case when there is no exception in try block then thefinally block is executed after tryblock. However if an exception occurs then the catch block is executedbefore finally block..
😉
+ 2
You still need the exception block only that it is empty in most language (pass in Python).