summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/for_break.py
blob: fa8dabd1501717ffd0832fa639c502cb359bfaf2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635

def foo():
    seq = [1, 2, 3]
    v = 100
    i = 5
    while i > 0:
        print(i)
        for a in seq:
            if a == 2:
                break
        i -= 1

foo()