結果 : python check if generator is exhausted