> Your for loops both use the same counting index. Since those variables are local to the for loop, theoretically it should work with both loops using the same variable. Although bad practice, I tested it on my machine and the following code does indeed work as expected, so it appears that the problem is indenting the for loops properly. for j in range( 10 ): print j, "first loop" for j in range( 5 ): print " ", j, "2nd loop"
-- http://mail.python.org/mailman/listinfo/python-list