kyub@discuss.tchncs.de to Programmer Humor@programming.devEnglish · edit-27 days agoThe infamous "if loop" actually existsdiscuss.tchncs.deimagemessage-square27fedilinkarrow-up1190arrow-down112file-text
arrow-up1178arrow-down1imageThe infamous "if loop" actually existsdiscuss.tchncs.dekyub@discuss.tchncs.de to Programmer Humor@programming.devEnglish · edit-27 days agomessage-square27fedilinkfile-text
minus-squareSaleh@feddit.orglinkfedilinkarrow-up1·edit-25 days 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()