Vidyalelo
Python · Q52

Exception Handling in Python

Programming · Python · question 52

Q52

What is the purpose of the assert statement in Python?

A.
To test if a given condition is True, and if not, raise an AssertionError exception
Answer
B.
To handle exceptions
C.
To print error messages
D.
To ignore errors

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board