I was expecting the code to have a “continue” statement after the if statement in the code below,
...
# If domain[:i + 1] is a dictionary word, set last_length[i] to the
# length of that word.
if domain[:i + 1] in dictionary:
last_length[i] = i + 1
continue // Here.
...
I agree that this might seem extraneous to a lot of people given that the code that follows does not have a side-effect due to a guarding condition, but it affected my reading of this code because I was expecting the loop to continue with the next iteration rather than moving forward in the current iteration (where there is nothing left to do).
Is my understanding correct?