• Create Intervals

 

Hi, I'm trying to solve https://py.checkio.org/en/mission/create-intervals/ . My code works fine in Visual Studio Code and passes all tests on checkio.org in "running mode", but fails in "check mode".

IndexError: pop from empty list, create_intervals, 4

Fail: create_intervals([])

Can somebody look into it? I've attached my code.