assertion error python
#assert <condition> , <message when condition is False (before halting the code)>
#assertion error happens when <condition> is False on e.g.
divisor = 0
assert divisor!=0 , "exiting due to zero divisor"
# if we run that on interactive Python interpreter:
>>> assert divisor!=0 , "exiting due to zero divisor"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AssertionError: exiting due to zero divisor
assert error lets us terminate code execution and tells us why