oop in python exception and exception classes in generalan exception is any unusual condition exception usually indicates errors but sometimes they intentionally puts in the programin cases like terminating procedure early or recovering from resource shortage there are number of built-in exceptionswhich indicate conditions like reading past the end of fileor dividing by zero we can define our own exceptions called custom exception exception handling enables you handle errors gracefully and do something meaningful about it exception handling has two components"throwingand 'catchingidentifying exception (errorsevery error occurs in python result an exception which will an error condition identified by its error type #exception / traceback (most recent call last)file ""line in / zerodivisionerrordivision by zero var= print(vertraceback (most recent call last)file ""line in print(vernameerrorname 'veris not defined #above as we have misspelled variable name so we get an nameerror print('hellosyntaxerroreol while scanning string literal #above we have not closed the quote in stringso we get syntaxerror #below we are asking for keythat doen' exists