prob 89 - in python