Unexpected result.

Paul Rubin http
Thu Sep 23 22:33:28 CEST 2004

"Larry Bates" <lbates at swamisoft.com> writes:
> Actually the result is exactly as expected.  Programming 101 teaches
> us not to reuse loop variables in nested loops.

Programming 101 usually doesn't say whether a nested loop introduces a
new scope or not.  If there's a new scope, it's not re-use of a variable.

More information about the Python-list mailing list