結果 : python define function within loop