How to calculate a mod b in Python?

There’s the % sign. It’s not just for the remainder, it is the modulo operation.

Leave a Comment