New submission from Aman Priyanshu <amanpriyanshusms2...@gmail.com>:
I have been annoyed by the fact that at multiple where we print list(str.split(ch)) we get empty elements in place of repeated characters (ch). Example: #### >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', 'How', 'Are', 'You?'] >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', '', '', '', '', '', '', 'How', 'Are', '', '', '', '', '', 'You?'] #### So can it be fixed so that it gives: #### >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', 'How', 'Are', 'You?'] >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', 'How', 'Are', 'You?'] #### ---------- messages: 352955 nosy: AmanPriyanshu priority: normal pull_requests: 15902 severity: normal status: open title: list(str.split(ch)) Does not print blank elements upon repeating character(ch) type: enhancement versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38247> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com