[Tutor] Quick question about .split()
Kyle Babich
python@kyle.sent.com
Mon Jun 30 08:16:03 2003
I haven't programmed in about six months and the way I remember it this
used to work:
abc = 'dog'
abc = abc.split('')
# now abc = ['d', 'o', 'g']
Except now when I do it this happens:
>>> abc = 'dog'
>>> abc = abc.split('')
Traceback (most recent call last):
File "<pyshell#54>", line 1, in ?
abc = abc.split('')
ValueError: empty separator
>>>
Did they change this in one of the newer versions or am I remembering
wrong? (just upgraded to 2.2.3)
What is a good work-around to this problem?
Thanks you,
--
Kyle