Wouldn't it be better to initialize this a set and not as a list? Then instead of expanding on the list why not appending to the set?