learn python the hard way:ex46--ex52