You could probably use the set() to do this rather than iterating over the full list.