On Jun 12, 8:06 pm, bvdp <[EMAIL PROTECTED]> wrote:
> dmitrey wrote:
> > hi all,
> > howto split string with both comma and semicolon delimiters?
>
> > i.e. (for example) get ['a','b','c'] from string "a,b;c"
>
> > I have tried s.split(',;') but it don't work
> > Thx, D.
>
> Howabout:
>
> s
dmitrey wrote:
hi all,
howto split string with both comma and semicolon delimiters?
i.e. (for example) get ['a','b','c'] from string "a,b;c"
I have tried s.split(',;') but it don't work
Thx, D.
Howabout:
s = s.replace(";", ",")
s = s.split(",")
--
http://mail.python.org/mail
> howto split string with both comma and semicolon delimiters?
>
> i.e. (for example) get ['a','b','c'] from string "a,b;c"
>
> I have tried s.split(',;') but it don't work
A very pedestrian solution would be:
def multisplit( s, seps ):
words = [ ]
word = ''
for char in s:
if
dmitrey wrote:
hi all,
howto split string with both comma and semicolon delimiters?
i.e. (for example) get ['a','b','c'] from string "a,b;c"
I have tried s.split(',;') but it don't work
Thx, D.
--
http://mail.python.org/mailman/listinfo/python-list
The regular expression module has a split