You can use generators to simplify nested loops and make it easier to break out of them.
Check out codegolf.stackexchange.com if you want to solve programming puzzles, but with a twist.