Why are you doing the iteration this way.. why not just do xrange(12) if you want to loop 12 times?  If you weren't careful you could loop forever in this pattern b/c of floating point arithmetic and the value never being exactly == 0.