SECTION 37 / 48

Understanding assert

1 min read

An assertion checks a condition: assert actual == expected. If the comparison is False, Python raises AssertionError.

Understanding assert
Understanding assert
Open image ↗
Understanding assert
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑