out of curiosity I wanted to see what would happen with
x=4
y=3
for y in xrange(0,y):
print "Y---",y
print "X---",x
for x in xrange(0,x):
print "x",x
this prints out
Y--- 0
X--- 4
x 0
x 1
x 2
x 3
Y--- 1
X--- 3
x 0
x 1
x 2
Y--- 2
X--- 2
x 0
x 1
y progresses as expected, but x decreases - what causes this to happen?