0
Exceptions(finally)"python 3"
Is there any kind of difference between : try: print(1/0) except: print("Error") finally: print("finished") and : try: print(1/0) except: print("Error") print("finished")
1 ответ
0
Yes. "finished"is always printed in the first code. In the second one, it's only printed if the execution reaches it. E.g., if you add "return" immediately after "try", the former will still print "finished", but the latter won't.