question regarding exception,finally ... | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 3
Yes. Finally gets executed regardless of how you exit the try block.
28th Jan 2018, 10:14 PM
John Wells
John Wells - avatar