bgailer at gmail.com
Tue Jan 10 21:53:37 CET 2012
On 1/10/2012 1:47 PM, Noah Hall wrote:
> a % b is the remainder operator. It returns what's "left" after
> dividing a by b.
Not to beat a dead horse- but % is the modulo operator.
It returns the residue class of the 2 operands. When a is positive this
is the same as remainder, but not so for negative a.
FWIW the Python documentation (at least as of 2.7.2 has this wrong!)
Chapel Hill NC
More information about the Tutor