from itertools import groupbyresult = [list(g) for k, g in groupby(data, lambda x:x=='') if not k]print(result) ...
from itertools import groupby
result = [list(g) for k, g in groupby(data, lambda x:x=='') if not k]
print(result)
from itertools import groupbyresult = [list(g) for k, g in groupby(data, lambda x:x=='') if not k]print(result) ...
from itertools import groupby
result = [list(g) for k, g in groupby(data, lambda x:x=='') if not k]
print(result)