def break_after_two_zero(array):
curr_list = []
for index, value in enumerate(array[:-1]):
curr_list.append(value)
if value == array[index + 1] == 0:
yield curr_list
curr_list = list()
if curr_list:
yield curr_list
data = [0, 7, 40, 41, 34, 96, 75, 127, 48, 65, 79, 27, 126, 78, 0,
0, 56, 45, 2, 67, 66, 124, 59, 82, 133, 102, 57, 54, 0,
0, 64, 97, 81, 87, 80, 61, 98, 52, 101, 83, 60, 109, 39, 53, 0]
print(list(break_after_two_zero(data)))
# >>> [[0, 7, 40, 41, 34, 96, 75, 127, 48, 65, 79, 27, 126, 78, 0],
# [0, 56, 45, 2, 67, 66, 124, 59, 82, 133, 102, 57, 54, 0],
# [0, 64, 97, 81, 87, 80, 61, 98, 52, 101, 83, 60, 109, 39, 53, 0]]
data = [0, 0, 7, 40, 41, 34, 96, 75, 127, 48, 65, 79, 27, 126, 78, 0, 0]
print(list(break_after_two_zero(data)))
# >>> [[0], [0, 7, 40, 41, 34, 96, 75, 127, 48, 65, 79, 27, 126, 78, 0], [0]]
data = [0, 7, 40, 41, 34, 96, 75, 0, 0, 0, 127, 48, 65, 79, 27, 126, 78, 0]
print(list(break_after_two_zero(data)))
# >>> [[0, 7, 40, 41, 34, 96, 75, 0],
# [0],
# [0, 127, 48, 65, 79, 27, 126, 78]]