Try except and finally block

what are these try except and finally block???

hey @ajaysiddartha ,
In every programming language there are chances when your code will run or not based on the system, coding manner , etc.
To counter these problems , these three blocks are made.

Any code line or lines ,which you think may return an issue or any error are implemented inside the try block.

Now , what we want is whenever any error occurs in the try block , i dont need to stop running my system , instead i want just want a notification that an error occured and continue the rest work.
So , the thing we need to implement to counter the error or issue occured in previous code , we write the snippet inside the except block.

Now , there comes a part of code that you are sure that will not raise any error and also it needs to be implemented after the code in try section , so you place that code in finally section.
Means , the code that requires to be run in each and every case , whether there is any error in previous code or not .

I hope this helped you.
Thank You :slightly_smiling_face:.
T