for el in seq:
    if el == sep:
        yield g
g = []
g.append(el)
yield g
ex = ['A', 'WORD', 'B', 'C', 'WORD', 'D']
result = list(group(ex, 'WORD'))
print(result)
Python spliting a list based on a delimiter word