Converting a string to an array?
xavier.morel at masklinn.net
Thu Jan 12 17:51:15 EST 2006
Tim Chase wrote:
> The closest hack I could come up with was
> import random
> s = "abcdefg"
> a = 
> s = "".join(a)
> This lacks the beauty of most python code, and clearly feels like
> there's somethign I'm missing. Is there some method or function
> I've overlooked that would convert a string to an array with less
> song-and-dance? Thanks,
>>> import random
>>> s = "abcdefg"
>>> data = list(s)
fit you better?
More information about the Python-list