This may convert what you had into a list comprehension, but to better optimize your code we need to know why you are doing things as @Kenny Ostrom and @Mark mentioned.
sub_total = 0
ret = [peak for peak, value in zip(list_1, list_2) if (sub_total := sub_total + peak) >= mid_rule]
your if statement in the list comprehension seemed incorrect in your example and that you were doing 0 + peak when it should be subtotal + peak in your other example.
Taking @Jerome Richard's suggestion you could do:
ret = []
sub_total = 0
for peak, value in zip(list_1, list_2):
sub_total += value
if sub_total >= mid_rule:
yield peak
and can make a generator comprehension like
sub_total = 0
ret = (peak for peak, value in zip(list_1, list_2) if (sub_total := sub_total + peak) >= mid_rule)
Though it seems strange to create a list object only to use a single item before the break ~ you could remove having it as a list which would save you very little time. But again we need to know what is occurring to further optimize your code.
Source