+ 1

Finally and except

Does the code continue to run after except? If yes then why is there need for finally?

18th Sep 2020, 2:36 PM
Bane
Bane - avatar
1 Odpowiedź
+ 7
Yes codes after except also run. Finally code block always executes even if there occurs an error. This is helpful in manipulating files. when in finally block you close the file even if there occurs an error
18th Sep 2020, 2:52 PM
TOLUENE
TOLUENE - avatar