Modulo operator in Python


Posted: 2008/03/18 20:05:45 | Source | More posts about problem Python

Was looking into modulo (%) operator in python. Very basic example is 14 % 3 = 2 ,

but the result is different for negative values . -14 % 3 , 14 % -3. Can anyone please explain me how it works properly ? The closest answer I got is this.

comments powered by Disqus
Contents © 2004-2014 Kushal Das - Powered by Shonku