In python, how can I split a long list into a list of lists, wherever I am? -. For example, how can I convert:
['1', 'a', 'b','---', '2','c','d','---','3','123','e','---','4']
to
[['1', 'a', 'b'],['2','c','d'],['3','123','e'],['4']]
Thank you very much in advance.
python
Dgt
source share