how python uses % operator?

Andrew Durdin adurdin at gmail.com
Sun Sep 19 20:35:15 EDT 2004


On 19 Sep 2004 17:10:55 -0700, Jani Yusef <jani at persian.com> wrote:
> Why is it in python -1%8 is equal to 7 , which is correct, of course
> but in C -1%8 is given as -1 ?

The "Programming FAQ" gives the answer:

http://www.python.org/doc/faq/programming.html#id23



More information about the Python-list mailing list