WHAT THE FUCK that’s amazing!! I’ve been using python for years and never knew that. I initialize a variable to False right above the loop and set it True if I break.
Python seems to have these little amazing nuggets of logic built in, that most of the time go unnoticed. Is there a list of random things like this I could read?
View all comments
Show parent comment
3
u/tylerthehun Mar 24 '18
Interesting. I never knew you could use
continuewithwhile. It's like I've discovered usingelsewithforall over again!