結果 : how to save terminal output in python