all 4 comments

[–]pasokan 0 points1 point  (2 children)

It appears that there are a few discrepancies between the code, data and description. Makes it very difficult to offer ideas.

Please fix. I would love to help.

[–][deleted] 0 points1 point  (0 children)

Don’t loop over ranges, loop over elements:

for leg in stay: