+ 1

question regarding exception,finally ...

Will the close() function get called in this code? https://code.sololearn.com/cgCbzF4Dp954/#py Yes or No ? Why ?

28th Jan 2018, 9:34 PM
NIMA
NIMA - avatar
1 ответ
+ 3
Yes. Finally gets executed regardless of how you exit the try block.
28th Jan 2018, 10:14 PM
John Wells
John Wells - avatar