0
while loop"Once it evaluates to False, the next section of code is executed. "I didn't understood what he meant by next sect
3 Antworten
+ 1
It breaks out of the loop and executes the code below it.
0
The loop code is the portion of indented code following the while.
The "next section" is whatever follows that portion (starting with the first non-indented line below the block).
Example:
while (condition):
action(1) // Part of the "while" block
action(2) // Still part of the block
action(3) // No longer indented, so the next section starts here
0
that must have been rather perplexing indeed, at the time anyway