Skip to content

Glossary: Coding Interviews

assert

Also written: assert statement, AssertionError

A Python statement that checks a condition is true. If it is false, Python stops with an `AssertionError`, which makes it a quick way to test your code.

Where the book teaches it

Related terms

Test functionpytest