from __future__ import division

from __future__ import division
Import the language feature division (exact division) that python will support in the future. When we do not import this feature in the program, the "/" operator performs truncating division (Truncating Division). When we import exact division, "/" executes is exact division, as follows:
---------------------------------------------------------------------------------------------
>>> 3/4
0
>>> from __future__ import division
>>> 3/4

0.75

--------------------------------------------------------------------------------------------

After importing exact division, to perform truncating division, you can use the "//" operator:
--------------------------------------------------------------------------------------------
>>> 3//4
0
>>>