i couldn’t understand try, return blocks.
I couldn't understand try, return blocks
Hey @premprakash.cr, can you please specify which thing in the video were u not able to understand ?..You can specify the time at which the video is not clear or you have doubt in. I’ll explain you in detail !
Thanks !
try blocks, finally blocks at time 2:35.
try blocks, finally blocks at time 2:35.
try blocks, finally blocks at time 2:35
Okay so try-catch blocks are used to deal with exceptions that may arise when testing or running a program. So when there comes any exception in the try block, the control is transferred to the except block and then the statements inside except block are executed.
Finally is another special block in exception handling which is executed in any case inside the code. So finally block is like a mandatory execution block even if exception arises or no exceptions arises.
I would recommend you to go through this link for best explanation of exception handling in python
I hope this clears your doubt !
Happy Learning !
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.