s = 0
for s in xrange(0, 100):
print "s before", s
if s % 10 == 0:
s += 10
print "s after", s
s = 0
while s < 100:
print "s before", s
if s % 10 == 0:
s += 10
s += 1
print "s after", s
As pictures shown above, why those 2 loops doing similar things, one using xrange while another using while-loop are giving me exact different output?