You can use generators to simplify nested loops and make it easier to break out of them.
Thank you @pineman for having hosted and managed my site for so long!