結果 : python check if last iteration of loop