結果 : how to write log function in python