Hello,
I do those things with OOTB nodes easily as drinking water but I need to do it in Python because computer crashes if the original list is massive.
I need to Add a sublist that starts with a word to the following sublists and repeat from each time a sublist starts with word appears, and finally remove the sublists that have been added to the other sublists.
This is how is done with OOTB nodes, screenshot:
and the dynamo file for testing:
addsublisttofrontifsublistcontainsstring.dyn (25.6 KB)