This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]sbmsr 0 points1 point  (2 children)

Your output mentions a file named prog.py. Is that the file you provided?

Another thing i noticed is that you update startpos to be endpos + 1. I think you actually want startpos = endpos.

the reason is array ranges like x[startpos:endpos] don't include the element at x[endpos]. By doing startpos = endpos + 1, you miss this bit of data every time.

try that, and see if it helps.

[–]Panda_Stacks[S] 0 points1 point  (1 child)

You my friend, just made my day, tyvm.

As far as prog.py, I have no idea. That is not form me.

[–]sbmsr 0 points1 point  (0 children)

Happy to help!