python code modify