Python: Does the set.add() function not add duplicates?
Set by definition is unordered collections of unique elements, so they don't allow duplicates. Please check the python's documentation.
A set can not contain duplicates. That is the point of a set. If you want duplicates, consider using a list instead.