The math.remainder() function returns the remainder of two numbers after division. 

math.remainder(x, y)

Where x is the dividend and y is the divisor.

The function returns the remainder as a floating-point number with the same sign as the dividend.

import math

print(math.remainder(4, 2))
print(math.remainder(6.5, -2))
print(math.remainder(-6.5, 2))
print(math.remainder(20, 6))