|
From: Juergen W. <wie...@fr...> - 2005-09-27 14:56:57
|
Petr Mikulik wrote: > Python works like gnuplot: > > Python 2.3.4 (#1, Feb 7 2005, 15:50:45) > [GCC 3.3.4 (pre 3.3.5 20040809)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > > >>> print 5/2 > > 2 > > >>> print 5//2 > > 2 Yes, but AFAIK this behaviour will change with 3.0. Try: >>> from __future__ import division >>> print 5/2 2.5 Juergen |