Python's assert statement helps you find bugs more quickly and with less pain. This note has some suggestions on good ways to use it. Here are some observations about debugging: Practically all software has some bugs; it's a matter of frequency and severity rather than absolute perfection. The sooner you find a bug, the better: amongst other things, that it avoids wasting other people's time when