Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
maaaats
· 11y ago · 0 comments
Oh, that's clever. Had to read it a couple times to see what was happening.
Comments
[–]
ssanderson11235
11y ago
Heh, thanks. It's amazing how well-suited Python's for-loop is for emulating this behavior: `break` just does exactly what you want, and you can throw in an else-block where you'd use a default in another language.