Advertisement



< Prev
Next >



Python - Raise Keyword





In Python, you may use the raise keyword when you explicitly want to raise/throw an exception. The keyword raise is followed by specifying the type of exception that you want to raise, which is specified by either an object of an exception class or the name of an exception class.

Using the raise keyword, an exception can be explicitly raised from within the two places -
Let us take a look at the syntax to use the raise keyword.




Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement



Notifications



Please check our latest addition

C#, PYTHON and DJANGO


Advertisement