I have
List1 = [[...11,12,13,14,7,8,9],[0,1,2,3]]
where ...
are consecutive integers starting from from 0 up to 11
I want
List2 = [[11,12,13,14],[7,8,9],[0,1,2,3]]
EDIT:
Found the answer:
from Python: split list of integers based on step between them
[list(g) for k, g in groupby(listName, key=lambda i,j=count(): i-next(j))]
Turns out, that wasn't what I was looking for. I need to be able to split the list of lists of integers by consecutive order ONLY if the next integer in that list was of lesser value than the preceding integer. e.g.
[[0,1,2,15,16,17,2,3,4,6,8,9]]
should be split into [[0,1,2,15,16,17],[2,3,4,6,8,9]]