Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:
>>> 6/3
2
>>> 6//3
2
As everyone has already answered, //
is floor division.
Why this is important is that //
is unambiguously floor division, in all Python versions from 2.2, including Python 3.x versions.
The behavior of /
can change depending on:
__future__
import or not (module-local)-Q old
or -Q new