Python code changed in problem set 1