exceptions aren' exceptional novice programmers tend to think of exceptions as only useful for exceptional circumstances howeverthe definition of exceptional circumstances can be vague and subject to interpretation consider the following two functionsdef divide_with_exception(numberdivisor)tryprint("{{{}formatnumberdivisornumber divisor )except zerodivisionerrorprint("you can' divide by zero"def divide_with_if(numberdivisor)if divisor = print("you can' divide by zero"elseprint("{{{}formatnumberdivisornumber divisor )these two functions behave identically if divisor is zeroan error message is printedotherwisea message printing the result of division is displayed we could avoid zerodivisionerror ever being thrown by testing for it with an if statement similarlywe can avoid an indexerror by explicitly checking whether or not the parameter is within the confines of the listand keyerror by checking if the key is in dictionary but we shouldn' do this for one thingwe might write an if statement that checks whether or not the index is lower than the parameters of the listbut forget to check negative values rememberpython lists support negative indexing- refers to the last element in the list eventuallywe would discover this and have to find all the places where we were checking code but if we had simply caught the indexerror and handled itour code would just work