+1 vote
1 view
in Python by (20.2k points)

Is there a modulo function in the python math library?

Isn't 15 % 4, 3? But 15 mod 4 is 1, right?

1 Answer

0 votes
by (50.6k points)
edited ago by

You can use the modulo operator(%), it gives you the remainder as well as the modulo.

See the example below:-

15 % 4

image

To know more about this you can have a look at the following video:-

...