Python | Exception Handling quiz | Question 8

Last Updated :
Discuss
Comments

 What is the purpose of the assert statement in Python exception handling?

To catch and handle exceptions

To raise a custom exception

To check if a given expression is true, otherwise raise an 'AssertionError'

To ignore exceptions

Share your thoughts in the comments