# SymPy | Subset.superset() in Python

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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

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.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.