Open
Description
Hi,
If I'm not mistaken, I think the "goto, but why?" section missed one I am trapped, please rescue!
Can you help double check it? (or am I missing some April Fool's joke?)
The code is
from goto import goto, label
for i in range(9):
for j in range(9):
for k in range(9):
print("I am trapped, please rescue!")
if k == 2:
goto .breakout # breaking out from a deeply nested loop
label .breakout
print("Freedom!")
The output should be
I am trapped, please rescue!
I am trapped, please rescue!
I am trapped, please rescue!
Freedom!
Instead of
I am trapped, please rescue!
I am trapped, please rescue!
Freedom!
Metadata
Metadata
Assignees
Labels
No labels