the first line of output shows that if we enter we get properly mocked if we call with valid number (note that it' not an integerbut it' still valid divisor)it operates correctly yet if we enter string (you were wondering how to get typeerrorweren' you?)it fails with an exception if we had used an empty except clause that didn' specify zerodivisionerrorit would have accused us of dividing by zero when we sent it stringwhich is not proper behavior at all we can even catch two or more different exceptions and handle them with the same code here' an example that raises three different types of exception it handles typeerror and zerodivisionerror with the same exception handlerbut it may also raise valueerror if you supply the number def funny_division (anumber)tryif anumber = raise valueerror(" is an unlucky number"return anumber except (zerodivisionerrortypeerror)return "enter number other than zerofor val in ( "hello" )print("testing {}:format(val)end="print(funny_division (val)the for loop at the bottom loops over several test inputs and prints the results if you're wondering about that end argument in the print statementit just turns the default trailing newline into space so that it' joined with the output from the next line here' run of the programtesting enter number other than zero testing helloenter number other than zero testing testing traceback (most recent call last)file "catch_multiple_exceptions py"line in print(funny_division (val)file "catch_multiple_exceptions py"line in funny_division raise valueerror(" is an unlucky number"valueerror is an unlucky number