1. Overview
The issuperset() method returns True if a set has every elements of another set (passed as an argument). If not, it returns False.
Set X is said to be the superset of set Y if all elements of Y are in X.

Here, set B is a superset of set A and A is a subset of set B.
The syntax of issuperset() is:
A.issuperset(B)
The following code checks if A is a superset of B.
2. Return Value from issuperset()
issuperset() returns
- True if A is a superset of B
- False if A is not a superset of B
3. Example: How issuperset() works?
A = {1, 2, 3, 4, 5}
B = {1, 2, 3}
C = {1, 2, 3}
# Returns True
print(A.issuperset(B))
# Returns False
print(B.issuperset(A))
# Returns True
print(C.issuperset(B))
Output
True False True
If you need to check if a set is a subset of another set, you can use issubset() in Python.
Related posts:
Python Program to Check if a Number is Odd or Even
Python String join()
Python object()
Python Program to Check If a String Is a Number (Float)
Python Data Analytics with Pandas, NumPy and Matplotlib - Fabio Nelli
Python zip()
Python String center()
Python Program to Find the Square Root
Java Program to Implement Dijkstra’s Algorithm using Set
Python Machine Learning Third Edition - Sebastian Raschka & Vahid Mirjalili
Python Program to Append to a File
Python Operators
Python Program to Parse a String to a Float or Int
Python String isnumeric()
Python List count()
Python String count()
Python Variables, Constants and Literals
Python Directory and Files Management
Python Inheritance
Python String rfind()
Python Program to Print Output Without a Newline
Python max()
Python Function Arguments
Python String isdigit()
Python callable()
Python Dictionary fromkeys()
Introduction to Machine Learning with Python - Andreas C.Muller & Sarah Guido
Python list()
Python issubclass()
Python Program to Split a List Into Evenly Sized Chunks
Python super()
Python Set remove()