Open In App

SymPy | Subset.superset() in Python

Last Updated : 28 Aug, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
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 Python3 1=1
# 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 Python3 1=1
# 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]

Article Tags :
Practice Tags :

Similar Reads

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy