What is mean by assert in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is mean by assert in python

25th Jul 2017, 4:46 PM
shashi
2 Answers
0
assertion checks that condition is True and throws exception otherwise
25th Jul 2017, 5:00 PM
S.P.j
0
assert means your program requests the assertion to be true. If it is not, an error is raised and the program stops.
25th Jul 2017, 5:04 PM
🔭Pierre Chary🐍
🔭Pierre Chary🐍 - avatar