problem num 2 in python