modify file of python assignment 4