• some help needed

Question related to mission Lightbulb Intro

 

hi everyone

I can't tell why my code doesn't work for the last self-testing. I think I still lack in datetime understanding.

Some hints to debug my code?

def sum_light(els: List[datetime]) -> int:
    return sum([(abs(els[i+1]-els[i])).seconds for i in range(0, len(els), 2)])

Thanks,

Oliver

14
OGR