examples/functions/raise_exception.py
from __future__ import print_function

x = 2
for y in [2, 9, 3]:
    print(y)
    if not x+y <= 5:
        raise Exception



examples/functions/assert.py
from __future__ import print_function

x = 2
for y in [2, 9, 3]:
    print(y)
    assert x+y <= 5