Commit 049a01d1 authored by Damien George's avatar Damien George
Browse files

tests: Add another test for break-from-for-loop.

parent ff8da0b8
......@@ -13,3 +13,15 @@ def foo():
i -= 1
foo()
# break from within nested for loop
def bar():
l = [1, 2, 3]
for e1 in l:
print(e1)
for e2 in l:
print(e1, e2)
if e2 == 2:
break
bar()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment