python source code from book "Fundamentals of Python"