On Dec 18, 10:53 am, "Vladimir Rusinov" <[EMAIL PROTECTED]> wrote: > On 12/15/07, katie smith <[EMAIL PROTECTED]> wrote: > > > > > if i have a number 6.345 and i wanted it to be 6 without subtracting .345 > > because it won't always be .345 what do i do? > > > how do i round to the nearest whole number. Or in this case round down. Is > > there an easy way to round down to the nearest whole number? > > init() ? > > -- > Vladimir Rusinov > GreenMice Solutions: IT-решения на базе Linuxhttp://greenmice.info/
You can either do: input_number = 6.345 from math import floor floor( input_number ) >>> 6.0 """This will return a float rounded down. or alternatively""" int( input_number ) >>> 6 """Which will return an integer data-type.""" -- http://mail.python.org/mailman/listinfo/python-list