Reference group
>Set Methods
Ways to manage unique values and compare groups of values. 17 entries.
add()set.add(element)Add a single element to the set.clear()set.clear()Remove all elements from the set.copy()set.copy()Return a shallow copy of the set.difference()set.difference(*others)Return a new set with elements in this set that are not in others.difference_update()set.difference_update(*others)Remove elements found in other sets from this set in place.discard()set.discard(element)Remove an element from the set if it is present without raising an error.intersection()set.intersection(*others)Return a new set with elements common to this set and all others.intersection_update()set.intersection_update(*others)Update the set in place, keeping only elements common to it and all others.isdisjoint()set.isdisjoint(other)Return True if two sets have no elements in common.issubset()set.issubset(other)Report whether another set contains this set.issuperset()set.issuperset(other)Report whether this set contains another set.pop()set.pop()Remove and return an arbitrary element from the set.remove()set.remove(element)Remove an element from the set; raises KeyError if not found.symmetric_difference()set.symmetric_difference(other)Return a new set with elements in either set, but not both.symmetric_difference_update()set.symmetric_difference_update(other)Update the set in place with the symmetric difference of itself and another.union()set.union(*others)Return a new set with elements from this set and all others.update()set.update(*others)Add elements from all provided iterables to the set in place.
Looking for something else?
All reference groups