0
Why do we use assert in Python 3?
Please anyone answer for this
2 ответов
+ 2
assert is typically used in unit testing, and it can be used for debugging, making sure that an unexpected condition doesn't cause any bugs in your program.
It should not be used for validation of data or user input, because assert can be disabled globally in the python interpreter.
Read this for more info.
https://dbader.org/blog/python-assert-tutorial
+ 1
Thank you for ur explanation