ziad:

However, the cell keeps running and running after Iteration: 72 is achieved. I’m not too sure why. Is there some stoppage logic I could use perhaps?


It seems the cell is not running anymore, but hangs instead.
Are you seeing the same issue in a terminal, if you execute the script directly without a notebook?