elif r == len(temperatures)-1: if l != len(temperatures)-2: l += 1 r = l + 1 else: warmer_days.append(0) break