結果 : how to implement undo redo in python