assert — Easy Playground
Debugging aid that tests a condition and raises AssertionError if false
Python Playground
Output
Click "Run" to execute your codeassert checks a condition and raises AssertionError if it's False. The message after the comma is optional but recommended.
Challenge
Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?