Adding 0.5, then converting to an int always works for me. >>> x = 6.345 >>> int( x + 0.5 ) >>> 6
Ron ----- Original Message ----- From: "katie smith" <[EMAIL PROTECTED]> To: <python-list@python.org> Sent: Saturday, December 15, 2007 9:09 AM Subject: Rounding > 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? > > > > ____________________________________________________________________________________ > Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs > > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list