question regarding exception,finally ... | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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