Simple % question

Rustom Mody rustompmody at gmail.com
Tue Feb 11 21:16:45 EST 2014


On Wednesday, February 12, 2014 6:36:17 AM UTC+5:30, Scott W Dunning wrote:
> I just have a simple question.  I don't understand why 1%10  = 1?

This is not really about python. See
http://en.wikipedia.org/wiki/Euclidean_division

Particularly the examples section and note that when you divide a by b you get a 
quotient -- q and remainder -- r.  In your case a is 1 b is 10.
Now see that wikipedia page



More information about the Python-list mailing list