On Wed, Oct 12, 2011 at 11:14 AM, Laurent Claessens <moky.m...@gmail.com> wrote: > This is well known : > >>>> 1/2 > 0 > > This is because the division is an "integer division". > > My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer
Include from __future__ import division on the top of your file >>> from __future__ import division >>> 1/2 0.5 -- http://mail.python.org/mailman/listinfo/python-list