adplus-dvertising
frame-decoration

Question

If we have two sets, s1 and s2, and we want to check if all the elements of s1 are present in s2 or not, we can use the function:

a.

s2.issubset(s1)

b.

s2.issuperset(s1)

c.

s1.issuperset(s2)

d.

s1.isset(s2)

Posted under Python

Answer: (b).s2.issuperset(s1)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. If we have two sets, s1 and s2, and we want to check if all the elements of s1 are present in s2 or not, we can use the function: