Pardon my ignorance, data conversion
François Pinard
pinard at iro.umontreal.ca
Mon Jan 17 14:06:13 EST 2000
aahz at netcom.com (Aahz Maruch) writes:
> Robert W. McGwier <rwmcgwier at home.com> wrote:
> >I need to do the simple task of taking a nonnegative floating point
> >variable and taking its integer part and storing it in an integer.
> >Damned if I can find how to do it.
> import math
> i = int(math.floor(real))
Would not a mere:
integer_value = int(real_value)
be sufficient?
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list