the number and the string are both caught by the except clauseand suitable error message is printed the exception from the number is not caught because it is valueerrorwhich was not included in the types of exceptions being handled this is all well and goodbut what if we want to catch different exceptions and do different things with themor maybe we want to do something with an exception and then allow it to continue to bubble up to the parent functionas if it had never been caughtwe don' need any new syntax to deal with these cases it' possible to stack except clausesand only the first match will be executed for the second questionthe raise keywordwith no argumentswill reraise the last exception if we're already inside an exception handler observe in the following codedef funny_division (anumber)tryif anumber = raise valueerror(" is an unlucky number"return anumber except zerodivisionerrorreturn "enter number other than zeroexcept typeerrorreturn "enter numerical valueexcept valueerrorprint("nononot !"raise the last line reraises the valueerrorso after outputting nononot !it will raise the exception againwe'll still get the original stack trace on the console if we stack exception clauses like we did in the preceding exampleonly the first matching clause will be runeven if more than one of them fits how can more than one clause matchremember that exceptions are objectsand can therefore be subclassed as we'll see in the next sectionmost exceptions extend the exception class (which is itself derived from baseexceptionif we catch exception before we catch typeerrorthen only the exception handler will be executedbecause typeerror is an exception by inheritance this can come in handy in cases where we want to handle some exceptions specificallyand then handle all remaining exceptions as more general case we can simply catch exception after catching all the specific exceptions and handle the general case there