cracking coding interview: python question