newbie question: converting integer to string
adina_levin at mindspring.com
adina_levin at mindspring.com
Sat Sep 22 12:42:26 EDT 2001
I would like to convert a variable, which represents an integer, to a
string.
To convert an integer to a string, one simply encloses the string in quotes.
e.g.
>>> '42'
'42'
But how do you do this if the integer is represented by a variable?
>>> num=42
how can I generate a string representation of num?
Thank you very much,
- Adina
More information about the Python-list
mailing list