I thought checking for membership was more efficient in a set. A set should be O(1) while a list is O(n).