python ch4 exercises