結果 : how to exit from nested loop in python