結果 : how to write a custom function in python