Integer Division: The `/` Operator Shift

In Python 2, `/` performed integer division when both operands were integers (e.g., `5 / 2` resulted in `2`), but in Python 3, `/` always performs float division (`5 / 2` yields `2.5`), with `//` introduced for explicit integer division.

Sources

Open the full topic