+ 1
Finally and except
Does the code continue to run after except? If yes then why is there need for finally?
1 Resposta
+ 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