Exception Handling
An exception can be defined as an abnormal condition in a program resulting in the disruption in the flow of the program.
Else block in Exception Handling
else lets you code sections that should run only when no exceptions are encountered in the try clause.
User-Defined Exception(Raising Exceptions)
Python also provides the raise keyword to be used in the context of exception handling. It causes an exception to be generated explicitly. Built-in errors are raised implicitly. However, a built-in or custom exception can be forced during execution.
Assert Statement:
Python provides the assert statement to check if a given logical expression is true or false. Program execution proceeds only if the expression is true and raises the AssertionError when it is false.
If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos
Python Course full playlist: • Python Tutorial in Tamil
C Language Course full playlist: • C Language Full Course
Python Course English full playlist: • Python Tutorial in English
Java Course English full playlist: • Java Tutorial in English
Subscribe to our channel by clicking here 👉👉🏾 / @arivuinfo_6666
#ARIVU_INFO