output = [[]]
valueToSplit = 2
data = [1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 2, 5, 2]
for i, val in enumerate(data):
    if val == valueToSplit and i == len(data) - 1:
        break
output.append([]) if val == valueToSplit else output[-1].append(val)
print(output)
split a list by a lambda function in python