.
In Python, the assert statement is used to continue the execution if the given condition evaluates to True. If the assert condition evaluates to False, then it raises the AssertionError exception with the specified error message.
.
Example:
x = 10
assert x > 0
print('x is a positive number.')
.
No comments:
Post a Comment