Convert long integer to string

Aahz Maruch aahz at panix.com
Thu May 24 10:30:12 EDT 2001


In article <3B0CAC7C.DCF2B091 at seznam.cz>, erik  <erik at seznam.cz> wrote:
>
> how convert long integer ( >2147483647 ) to string whithout "L" on end?

This is guaranteed to work in all versions of Python (and is slightly
simpler than Laura's version):

repr(val)[:-1]
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"You do not make history; you can only hope to survive it."  --G'kar



More information about the Python-list mailing list