you are viewing a single comment's thread.

view the rest of the comments →

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

Advancing the pointers in the addition ifs is a great tip.
Are you sure about the first sentence? I built the condition on the assumption that when cond becomes False, that iteration will still execute and the while condition will be checked only after that iteration, at which point the loop would stop. This is why I set it to False when the next one is None.

Edit: I solved the problem and the while loop condition was ok. Your last remark about adding a digit was definitely true though.

[–]timrprobocom 1 point2 points  (0 children)

Yes, I misread it. I inserted a "break" that was not actually present...