[Tutor] Evaluate my script?

Kent Johnson kent37 at tds.net
Tue Oct 24 17:34:10 CEST 2006


Luke Paireepinart wrote:
> so in Python 3000 there's no more integer division?
> I hope this is not the  case.
> Sometimes it's the desired action, like when you repeatedly divide/mod a 
> variable.

Integer division is still available using the // operator:

In [1]: from __future__ import division

In [2]: 3/2
Out[2]: 1.5

In [3]: 3//2
Out[3]: 1

Kent



More information about the Tutor mailing list