You can use generators to simplify nested loops and make it easier to break out of them.
Why didn't sin and tan go to the party? Just cos.