Skip to content
Set Methods

issuperset()

Report whether this set contains another set.

set.issuperset(other)

set.issubset() tests whether every element of other is contained in the calling set.

Equivalent to the >= superset operator.

Parameters

NameDescription
otherAn iterable to test against.

Returns

True if this set is a superset; otherwise False.

Try it

Run it and change it
languages = {"Python", "JavaScript", "C++", "Go", "Rust"}
backend = {"Python", "Go"}
print(languages.issuperset(backend))

Worth knowing

  • Proper superset: To test strict superset (must have additional elements), use the > operator.

Related entries