Is there a modulo function in the Python math library?
math
Isn't 15 % 4, 3? But 15 mod 4 is 1, right?
15 % 4
15 mod 4
There's the % sign. It's not just for the remainder, it is the modulo operation.
%
2.1m questions
2.1m answers
60 comments
57.0k users