File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -237,9 +237,10 @@ which searches for prime numbers::
237237the ``for `` loop, **not ** the ``if `` statement.)
238238
239239One way to think of the else clause is to imagine it paired with the ``if ``
240- inside the loop. If you conceptually unroll the loop, you have an if/if/if/else
241- structure.  The ``if `` is inside the loop, executing a ``break ``, and the
242- ``else `` is the else clause outside the loop.
240+ inside the loop.  As the loop executes, it will run a sequence like
241+ if/if/if/else. The ``if `` is inside the loop, encountered a number of times. If
242+ the condition is ever true, a ``break `` will happen. If the condition is never
243+ true, the ``else `` clause outside the loop will execute.
243244
244245When used with a loop, the ``else `` clause has more in common with the ``else ``
245246clause of a :keyword: `try ` statement than it does with that of ``if ``
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments