結果 : how to exit a nested loop in python