transform list of int in a list of string??
Erik Max Francis
max at alcyone.com
Fri Sep 13 15:12:08 EDT 2002
jubafre at brturbo.com wrote:
> How can i transform a list of integer numbers in a list of string
> numbers, like that:
>
> x=[1,2,3,4] to y=['1', '2'...]????????
map(str, L)
Or if you prefer list comprehensions,
[str(x) for x in L]
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ To be a man means to be a fellow man.
\__/ Leo Baeck
PyUID / http://www.alcyone.com/pyos/uid/
A module for generating "unique" IDs in Python.
More information about the Python-list
mailing list