Converting a string to an array?
python.list at tim.thechases.com
Thu Jan 12 15:20:25 EST 2006
While working on a Jumble-esque program, I was trying to get a
string into a character array. Unfortunately, it seems to choke
on the following
s = "abcefg"
File "/usr/lib/python2.3/random.py", line 250, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: object doesn't support item assignment
The closest hack I could come up with was
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
More information about the Python-list