Raise Exceptions Exceptions are raised with a raise statement raise <expression> <expression>must be an Exception,which is created like so: E.g.,TypeError('Error message') TypeError --A function was passed the wrong number/type of argument NameError --A name wasn't found KeyError--A key wasn't found in a dictionary RuntimeEr ror --Catch-all for troubles during interpretationRaise Exceptions Exceptions are raised with a raise statement raise <expression> <expression> must be an Exception, which is created like so: E.g., TypeError('Error message') TypeError -- A function was passed the wrong number/type of argument NameError -- A name wasn’t found KeyError -- A key wasn’t found in a dictionary RuntimeError -- Catch-all for troubles during interpretation