Working through dive into python 3