Split a list into other sublists, splitting will be based on a space defined in the main list – stackoverflow.com

Let say I have this list: list1 = ["I", "am", "happy", " ", "and", "fine", " ", "and", "good"] I want to end up with: sublist1 = ["I", "am", "happy"] sublist2 = ["and", "fine"] sublist3 = ["and", ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Split a list into other sublists, splitting will be based on a space defined in the main list – stackoverflow.com"