Convert long integer to string

Alex Martelli aleaxit at yahoo.com
Thu May 24 04:38:07 EDT 2001


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

D:\Python21>python
Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> x=99999999999999999L
>>> print x
99999999999999999
>>> str(x)
'99999999999999999'
>>> repr(x)
'99999999999999999L'
>>>


Alex






More information about the Python-list mailing list