Basic question

Dmitry Dzhus mail at sphinx.net.ru
Sat May 12 12:42:27 EDT 2007


> "j=j+2" inside IF does not change the loop
> counter ("j")

You might be not truly catching the idea of Python `for` statements
sequence nature. It seems that <http://docs.python.org/ref/for.html>
will make things quite clear.

> The suite may assign to the variable(s) in the target list; this
> does not affect the next item assigned to it.

In C you do not specify all the values the "looping" variable will be
assigned to, unlike (in the simplest case) you do in Python.

-- 
Happy Hacking.

Dmitry "Sphinx" Dzhus
http://sphinx.net.ru



More information about the Python-list mailing list