Serhiy Storchaka added the comment:
Such problems are solved by using regular expressions.
>>> re.findall('(?:^|(?<=;)).?[^;]*', 'abc;;def;hij')
['abc', ';def', 'hij']
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22360>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com