int to string conversion: newbie question

Neal Norwitz neal at metaslash.com
Sat Mar 22 14:42:37 EST 2003


On Sat, 22 Mar 2003 14:16:59 -0500, Kristofer Wouk wrote:

>     I know I'm dumb, but I can't figure this out. How do I convert from
>     an int to a string?

Take your pick:

	>>> '%s' % 53
	'53'
	>>> str(53)
	'53'
	>>> '%d' % 53
	'53'

Neal




More information about the Python-list mailing list