7 lines
263 B
Python
7 lines
263 B
Python
|
|
a = 5
|
||
|
|
#...input or change a here
|
||
|
|
assert a == 42 # throws an AssertionError when a is not 42
|
||
|
|
assert a == 42, "Error message" # throws an AssertionError
|
||
|
|
# when a is not 42 with "Error message" for the message
|
||
|
|
# the error message can be any expression
|