itoa

Martijn Faassen m.faassen at vet.uu.nl
Mon Mar 13 19:09:31 EST 2000


Stuart Reynolds <S.I.Reynolds at cs.bham.ac.uk> wrote:
> Is there an integer to ascii (itoa) function in Python? I need to
> convert integers into various different bases (but to binary, in
> particular). Most languages come provided with an itoa-like function but
> I can't seem to find one in the Python API.

So you mean you want to convert an integer to to a string? What about
the built in function str()? 

>>> str(5)
'5'

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list