Report Bug

QusIf 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: Qusयदि हमारे पास दो सेट हैं, s1 और s2, और हम यह चेक करना चाहते हैं कि s1 के सभी एलिमेंट s2 में मौजूद हैं या नहीं, हम फ़ंक्शन का यूज़ कर सकते हैं:


A. s2.issubset(s1)
B. s2.issuperset(s1)
C. s1.issuperset(s2)
D. s1.isset(s2)


Solution
B. s2.issuperset(s1)



Explanation
Since we are checking whether all the elements present in the set s1 are present in the set s2. This means that s1 is the subset and s1 is the superset. Hence the function to be used is: s2.issuperset(s1). This operation can also be performed by the function: s1.issubset(s2).
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz