int to string conversion: newbie question
Nicola Paolucci
durdn at yahoo.it.oops!.invalid
Sat Mar 22 14:42:09 EST 2003
Hi Kristofer,
Kristofer Wouk wrote:
> Hey,
>
> I know I'm dumb, but I can't figure this out. How do I convert from an
> int to a string?
You can use built-in functions str() or repr().
As an example:
>>> 10
10
>>> repr(10)
'10'
>>> str(10)
'10'
>>>
Best regards,
Nicola Paolucci
--
#Remove .oops!.invalid to email or feed to Python:
'Tmljb2xhIFBhb2x1Y2NpIDxuaWNrQG5vdGp1c3RjYy5jb20+'.decode('base64')
More information about the Python-list
mailing list