Translations:Dimensionner une installation photovoltaïque autonome/247/en

  1. Calculate maximum number of consecutive days without production

max_streak = 0 current_streak = 0 for value in resultday:

   if value == 0:
       current_streak += 1
       max_streak = max(max_streak, current_streak)
   else:
       current_streak = 0  # Reset the streak if the value is not zero

print(f"\nMaximum number of consecutive days without production: {max_streak}")