Python 3 reference · Set Methods

Python Set issuperset() Method

Return True if this set contains every element of the other. The same as a >= b.

Python 3 Since 3.0

Syntax

set.issuperset(other)

Parameters

ParameterDescription
other An iterable.

Return value

True or False.

Examples

Basic useTry it yourself
print({1, 2, 3}.issuperset({1, 2}), {1, 2} >= {1, 3})

Output

True False
Check permissionsTry it yourself
user_perms = {"read", "write", "delete"}
print(user_perms.issuperset(["read", "write"]))

Output

True

Version history

VersionChange
Python 3.0Added