Why doesn't this work ? For loop variable scoping ?

Benjamin Peterson benjamin at python.org
Thu Mar 19 23:33:27 CET 2009

Linuxguy123 <linuxguy123 <at> gmail.com> writes:

> Hi people. 
> I've got a small piece of code that I don't understand.  Basically, a
> variable inside an if statement inside a for loop doesn't seem to be
> updating.  Is this a scope issue ?

No, it's because you mispelled the variables.

More information about the Python-list mailing list