kyub@discuss.tchncs.de to Programmer Humor@programming.devEnglish · edit-23 months agoThe infamous "if loop" actually existsdiscuss.tchncs.deimagemessage-square30linkfedilinkarrow-up1196arrow-down113file-text
arrow-up1183arrow-down1imageThe infamous "if loop" actually existsdiscuss.tchncs.dekyub@discuss.tchncs.de to Programmer Humor@programming.devEnglish · edit-23 months agomessage-square30linkfedilinkfile-text
minus-squareSaleh@feddit.orglinkfedilinkarrow-up1·edit-23 months agoCouldn’t you just handle this with: breakflag = False for x in iterator: if breakcondition(x): breakflag = True break dostuff()
Couldn’t you just handle this with:
breakflag = False for x in iterator: if breakcondition(x): breakflag = True break dostuff()