Jack Diederich <jackd...@gmail.com> added the comment: I suggest this be closed WONTFIX. The str.split() documentation accurately describes str.split() but doesn't happen to do what the OP wanted which was
list(filter(None, '00010001'.split('0'))) Instead split(sep) is the reciprocal of sep.join(), that is txt == sep.join(txt.split(sep)) ---------- nosy: +jackdied _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7196> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com