A work around is to write one or both of the numbers as a decimal:
>>> print 7/3.0
2.5
>>> print 7.0/3
2.5
>>> print 7.0/3.0
2.5
In order to change this behaviour of Python, throughout the program execution, so that Python will always produce real numbers, a module division has to be imported.2.5
>>> print 7.0/3
2.5
>>> print 7.0/3.0
2.5
>>> from __future__ import division
>>> print 7/3
2.5
>>> print 7/3
2.5