Revert changes in python