On Mon, Jul 24, 2017 at 12:23 PM, Ben Hoyt <benhoyt at gmail.com> wrote: > .. I found a kind of mnemonic to help me remember when the > "else" part happens: I think of it not as "for ... else" but as "break ... > else" -- saying it this way makes it clear to me that the break goes with > the else. "If this condition inside the loop is true, break. ... *else* if > we didn't break, do this other thing after the loop." Note that since break itself is typically guarded by an "if" as in for i in x: ... if cond(i): break ... else: ... you can match the "else" above to the "if" inside the loop.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4