Python | Classes Quiz | Question 16

Last Updated :
Discuss
Comments

How can you create a custom exception class in Python?

By inheriting from the Exception class

By using the @exception decorator

Custom exceptions must inherit from Exception class.

By creating a class with any name

Share your thoughts in the comments