結果 : remove last n lines from file python