結果 : python detect last loop iteration