On Apr 30, 11:23 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > DEAR SIR, > > I SAW YOUR INTERNET QUESTION AND I HAVE THE SAME TROUBLE. > > CUOLD YOU HELP ME TO MAKE A FLOAT TO INTEGER CONVERTION? > > DO YOU HAVE ANY EXEL FILE THAT CAN DO THAT? > > REGARDS AND THANKS A LOT > > > IVAN REYES > > > ___________________________________ > > > AVISO LEGAL: El presente correo electronico no representa la opinion o el > > consentimiento oficial de la PONTIFICIA UNIVERSIDAD JAVERIANA. Este mensaje > > es confidencial y puede contener informacion privilegiada la cual no puede > > ser usada ni divulgada a personas distintas de su destinatario. Esta > > prohibida la retencion, grabacion, utilizacion, aprovechamiento o > > divulgacion con cualquier proposito. Si por error recibe este mensaje, por > > favor destruya su contenido y avise a su remitente. > > En este aviso legal se omiten intencionalmente las tildes. > > > Este mensaje ha sido revisado por un sistema antivirus, por lo que su > > contenido esta libre de virus. > > This e-mail has been scanned by an antivirus system, so its contents is > > free of viruses. > > You have given us an ill defined problem. > > 1) If you want to convert float to int just use int() function. > s=int(f) > > 2) If you want to keep some fractional part of the float multiply > it by 10, 100, 1000, 10000, ... depending on how many digits of > precision you wish to retain and then take int(). > > s=int(f*10000) > > would retain 4 digits of precision and throw away the remainder. > > 3) You can sort on float just fine, so why do you need int()? >
and: (4) Who is the "dear sir" and what was his problem? (5) How do you imagine that an Excel file could assist? (6) Please consider giving your CapsLock key a squirt of WD-40 :-) -- http://mail.python.org/mailman/listinfo/python-list