Python __mod__() Magic Method
Syntax object.__mod__(self, other) The Python __mod__() method implements the modulo operation % that per default returns the remainder of dividing the left by the right operand. Internally, Python attempts to call x.__mod__(y) to implement the modulo operation x%y. If the method is not implemented, Python first attempts to call __rmod__ on the right operand and … Read more