Think Python ch14 exercises