On 2011-07-21, Web Dreamer <webdrea...@nospam.fr> wrote:
> Leo Jay a ?crit ce jeudi 21 juillet 2011 11:47 dans 

> int(x.split('.')[0])
>
> But, the problem is the same as with int(float(x)), the integer number is
> still not as close as possible as the original float value.

Nobody said that "close as possible to the original float value" was
the goal.  Perhaps the OP just wants it truncated.

-- 
Grant Edwards               grant.b.edwards        Yow! OVER the underpass!
                                  at               UNDER the overpass!
                              gmail.com            Around the FUTURE and
                                                   BEYOND REPAIR!!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to