#31| Python Beginners Tutorial | Exception Handling
Python provides two very important features to handle any unexpected error in your Python programs and to add debugging capabilities in them −
Exception Handling − This would be covered in this tutorial. Here is a list standard Exceptions available in Python: Standard Exceptions.
Assertions − This would be covered in Assertions in Python tutorial.
What is Exception?
An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions. In general, when a Python script encounters a situation that it cannot cope with, it raises an exception. An exception is a Python object that represents an error.
When a Python script raises an exception, it must either handle the exception immediately otherwise it terminates and quits.
Handling an exception
If you have some suspicious code that may raise an exception, you can defend your program by placing the suspicious code in a try: block. After the try: block, include an except: statement, followed by a block of code which handles the problem as elegantly as possible.
c tutorial link - • C Programming Tutorials in Tamil | Pa...
oops link - • Learn Object Oriented Programming in ...
html5 link - • 1# Introduction to HTML5 programming ...
css3 link - • PART-1 INTRODUCTION TO CSS3 AND ITS ...
javascript link - • PART-1 INTRODUCTION TO CSS3 AND ITS ...
python link • #1 - Python Tutorial in Tamil | Intro...
c tricks - • ADD TWO NUMBERS WITHOUT USING ARITHME...
c interview questions - • Find The Output Of the Program in Tamil
sample program - • HOW TO WRITE C PROGRAM FOR BASIC ADDI...
c++ program - • PART-01 INTRODUCTION TO C++ PROGRAMMI...
vb6 tutorial - • Visual Basic 6 Tutorial in Tamil
__
like our face book page..
/ santratechspot
--------------------------------------------------------------------------------
send request our channel official facebookprofile...
/ santra.techspot.5
---------------------------------------------------------------------------------
#santratechspot