Account
Categories

Divide AND Assign Operator


Definition:

The Divide AND Assign Operator (/=) is used to divide a variable by a value and store the result in the same variable.

It divides the value on the left side by the value on the right side.

Syntax:

variable /= value

Example:

x = 20
x /= 4  # divides x by 4
print(x)

Output: