- - '/', . itertools.groupby , - , , .
l = ['i1', 'i2', 'i3', '/', 'i4', 'i5', 'i6', '/']
chunks = []
x = 0
chunks.append([])
for i in l:
if i != '/':
chunks[x].append(i)
else:
x += 1
chunks.append([])
print chunks
, , python - - ' ' (), '/', ' ' .
l = ['i1', 'i2', 'i3', '/', 'i4', 'i5', 'i6', '/']
s = " ".join(l)
chunks2 = [x.split() for x in s.split("/")]
print chunks2