Nested For and While Statements

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sat Sep 22 09:07:03 EDT 2007


koutoo at hotmail.com a écrit :
(snip)
> My actual code has different variables, but thanks for pointing that
> out.  I'm so used to coding in VB, where indenting isn't a problem, so
> all this indenting is new to me how Python wants it dictated. 

statement:
   block line 1
   block line 2
# end statement block


  I made
> the changes and still get an error at the same point after the second
> For statement? So:
> 
> While :
>      Code under while
>      More under while.
> 
>      For (x)
>           Part of x
>           Last of x
> 
>           For(y)
>                Part of y
>                Still part of y
>                last part of y.
             # end for(y)

>           New line part of x #where does this belong? 

        # end for(x)

>      Last line under while not in For  #Should go under While, right?

   # end while



More information about the Python-list mailing list