Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
We can, but we shouldn't. Assert is a debugging tool and gets ignored by the interpreter depending on the mode in which your script will be run. So for normal code concerns, better use conventional error handling.
2nd Feb 2019, 2:40 PM
HonFu - avatar