Can I count to 100, but reset every 10 back to 0 using bit masks? - or am I barking up the wrong tree?
"""
Required output:
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5...etc repeated 10 times.
"""
reset = 10
for x in range(0, 101):
a = (x ^ reset)
b = x & a
print "Value: %s, %s, %s" % (x, a, b)