Update Python Problem 40