What is try, except…
 
Notifications
Clear all

What is try, except and finally block ?

1 Posts
2 Users
0 Likes
165 Views
0
Topic starter

What is try, except and finally block ?

1 Answer
0

The try block lets you test a block of code for errors. The except block lets you handle the error. The else block lets you execute code when there is no error. The finally block lets you execute code, regardless of the result of the try- and except blocks.

Share: