Home >>Python Set Methods >Python Set issuperset() Method
Python Set issuperset() Method in python set is used to returns true if all elements of set 2 present in the set1 which is passed as a argument, otherwise it returns false.
Syntax:set.issuperset(set)
Parameter | Description |
---|---|
set | It is Required. The set of equal items to be searched for |
a = {"12", "32", "42", "52", "62", "72"}
b = {"52", "32", "12"}
c = a.issuperset(b)
print(c)
x = {65, 23, 45, 5}
y = {45, 20, 65, 23, 15, 5, 45, 5}
print("x.issuperset(y) : ", x.issuperset(y))
print("y.issuperset(x) : ", y.issuperset(x))