Advertisements
Advertisements
Question
Write the syntax of the raise statement.
Code Writing
Advertisements
Solution
Syntax of raise statement:
raise ExceptionName("Error message")
Example:
raise ValueError("Invalid value")shaalaa.com
Is there an error in this question or solution?
