A set holds distinct items, with no order and no repeats. That sounds odd, but it describes a lot of real questions: which different words appear in this text, has this id been seen before, who is on both lists. A set answers them quickly and in very little code.
More lessons in Complete Python Programming