結果 : how to write nested functions in python