\ arithmetic operator

The \ operator (also called the remainder operator) calculates the remainder of dividing the dividend by the divisor (otherwise known as the modulo).

Syntax

dividend \ divisor

Description

There is no limitation on the numeric value of the dividend or divisor.

Example(s)

In this example, 5 (the remainder of 21/8) is printed.

x = 21
y = 8
z = x \ y
print z