Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Using zip solution in Clear category for Lightbulb Intro by erykcoapl
from datetime import datetime
from typing import List
def sum_light(els: List[datetime]) -> int:
return sum((off-on).total_seconds() for on, off in zip(els[::2], els[1::2]))
March 28, 2021