Using 'from __future__ import division' will allow Python to always return a float as the result of integer division.

Jul 1, 2010 · 8:35 PM UTC

2