In Python 3.x, division result is always float.
Even in Python 2.7 you can actually set this functionality by importing "division" module from future.
from __future__ import division
1 / 2
# 0.5
:)
In Python 3.x, division result is always float.
Even in Python 2.7 you can actually set this functionality by importing "division" module from future.
from __future__ import division
1 / 2
# 0.5
:)