true division

Division with the / operator, which always gives a float, even when the answer is whole: 6 / 3 is 2.0.

In more detail

Python 3 made / always produce a float, removing a classic Python 2 surprise where 7 / 2 gave 3. Use // for a whole-number quotient.

Example

7 / 2   # 3.5

Related terms

Taught in

References

Certification courses