結果 : how to close loops in python