Subset.superset() : superset() is a sympy Python library function that returns the superset of the subset.
Syntax :
sympy.combinatorics.subset.Subset.superset()Return :
the superset of the subset.
Code #1 : superset() Example
# Python code explaining # SymPy.Subset.superset() # importing SymPy libraries from sympy.combinatorics import Permutation, Cycle from sympy.combinatorics.subsets import Subset # Using from # sympy.combinatorics.subset.Subsets.superset() # Creating Subset a = Subset(['c', 'd'], ['geek', 'for', 'c', 'd']) # superset value print ("Subset a superset : ", a.superset) |
Output :
Subset a superset : [‘geek’, ‘for’, ‘c’, ‘d’]
Code #2 : superset() Example
# Python code explaining # SymPy.Subset.superset() # importing SymPy libraries from sympy.combinatorics import Permutation, Cycle from sympy.combinatorics.subsets import Subset # Using from # sympy.combinatorics.subset.Subsets.superset() # Creating Subset a = Subset([2, 3, 4], [1, 2, 3, 4, 5]) # superset value print ("Subset a superset : ", a.superset) |
Output :
Subset a superset : [1, 2, 3, 4, 5]
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
Recommended Posts:
- Python | Sympy Line.is_parallel() method
- Python | sympy.GreaterThan() method
- Python | sympy.StrictLessThan() method
- Python | sympy.LessThan() method
- Python | sympy.StrictGreaterThan() method
- Python | sympy.ones() method
- Python | sympy.zeros() method
- Python | sympy.eye() method
- Python | Getting started with SymPy module
- Python | Sympy Ellipse.equation() method
- Python | Sympy Ellipse() method
- Python | sympy.combinatoric.Polyhedron() method
- SymPy | Prufer.rank() in Python
- SymPy | Prufer.size() in Python
- Python | sympy.trailing() method
- Python | sympy.multiplicity() method
- Python | sympy.perfect_power() method
- Python | sympy.factorint() method
- Python | sympy.smoothness() method
- Python | sympy.sec() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

