結果 : how to create a log function in python