It is a method in python that checks if every element of the other set is present in the main set or not. Returns True if the given set is present in the other set (passed in the argument) else returns False. It doesn’t modifies the given set.
Syntax:
set1.issuperset(set2)
set1>=(set2)
Also Read: Python Set – issubset() Method
Example:
# Python code to understand issuperset() method in set
# www.codewindow.in
s1 = {2, 5, 8, 7, 9}
s = {2, 5, 8}
s2 = {2, 8, 9}
s3 = {7, 5}
#is s a superset of s1?
print(s.issuperset(s1))
#is s1 a superset of s?
print(s1.issuperset(s))
#is s3 a superset of s1?
print(s3>=(s1))
#is s2 a superset of s1?
print(s2.issuperset(s1))
Output:
False
True
False
False
Explanation:
Here, all the elements of s1 are not present in set s.
All the elements of s are present in s1.
All the elements of s1 are present not in set s3.
All the elements of s1 are not present in set s2.
Follow Us
You Missed
- Dunzo Off-Campusing Drive | Data Engineer | codewindow.in
- Verbal Ability Questions Solved | Synonyms Antonyms – codewindow.in
- Verbal Ability Questions Solved | Statement Correction – codewindow.in
- Verbal Ability Questions Solved | Spotting Error – codewindow.in
- Verbal Ability Questions Solved | Speech and Tenses – codewindow.in
- Try
- Verbal Ability Questions Solved | Sentence Arrangement – codewindow.in
- Verbal Ability Questions Solved | Prepositions – codewindow.in
- Verbal Ability Questions Solved | Grammar – codewindow.in
- Verbal Ability Questions Solved | Articles – codewindow.in
- Zoho Off Campus Drive | Product Marketing Associate / Specialist | codewindow.in
- BerryWorks Off Campus Recruitment Drive – Software Engineer – Codewindow.in
- Microsoft Off Campus Hiring Drive – Technical Support – Codewindow.in
- Infosys Pseudocede & Puzzle Solved – codewindow.in
- Infosys Verbal Questions Solved – codewindow.in
- Amazon Off Campus Drive | Trainee | codewindow.in
- Hawkins Off Campus Drive | Management trainees | codewindow.in
- Infosys Mathematical Questions Solved – codewindow.in
- Paypal Off Campus Recruitment Drive – Software Engineer – Codewindow.in
- IBM Off Campus Hiring Drive – Associate Systems Engineer – Codewindow.in
- Infosys Off Campus Hiring Drive – SP and DSE – Codewindow.in
- VIRTUSA Recruitment 2022 | Associate Engineer | codewindow.in
- Infosys Logical Questions solved – codewindow.in
- Google Off Campus Hiring Drive – IT Support Engineer – Codewindow.in
- Capgemini Pseudocode Solved | Set 4 – codewindow.in
- Capgemini Pseudocode Solved | Set 3 – codewindow.in
- Capgemini Pseudocode Solved | Set 2 – codewindow.in
- JECA 2022 Question Paper – 90+ Sample Questions Exposed – codewindow.in
- Capgemini Pseudocode Solved | Set 1 – codewindow.in
- Verizon Off Campusing | Software Developer | codewindow.in
- TCS Recruitment Off-Campusing | Service Desk Analyst | codwindow.in
- Amdocs Off-Campusing | Devops Engineer | codewindow.in
Also Checkout
- Algorithm
- Aptitude
- Capgemini Coding Questions
- Capgemini Pseudocode
- CodeVita
- Coding Questions
- Cognizant Placement
- Data Structure and Algorithm
- Epam Full Question Paper
- Guidance for Accenture
- HR Questions
- IBM Questions
- Infosys
- Internship
- Interview Experience
- JECA
- Job Info
- Machine Learning
- Miscellaneous
- NPCI
- Programming in C
- Programming in C++
- Programming in JAVA
- Programming in Python
- Quiz
- Recruiting Companies
- Revature
- Study Material
- TCS NQT
- Tech Mahindra Coding Questions
- Tech Mahindra Questions
- Uncategorized
- Verbal Ability
- Web Development
- Wipro Coding Questions
- Wipro NLTH
- WIpro NLTH Coding Solve