a very simple label function in the book of Beginning Python