I have, for example, the following list:
['|', u'MOM', u'DAD', '|', u'GRAND', '|', u'MOM', u'MAX', u'JULES', '|']
and want it to be separated by "|" so the result will look like this:
[[u'MOM', u'DAD'],[ u'GRAND'], [u'MOM', u'MAX', u'JULES']]
How can i do this? I find only examples of lists on the net that need element lengths
python split sublist
W0bble
source share