summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/while_cond.py
blob: 449c5b66ea5f4ac1bf31a4b14933194cca1eb4e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# test while conditions which are optimised by the compiler

while 0:
    print(0)
else:
    print(1)

while 1:
    print(2)
    break

while 2:
    print(3)
    break

while -1:
    print(4)
    break