結果 : how to avoid recursion in python