Python | sympy.combinatorics.Subset().cardinality method Last Updated : 28 Aug, 2019 Comments Improve Suggest changes Like Article Like Report With the help of sympy.combinatorics.Subset().cardinality method, we can find the total cardinality of subsets by using sympy.combinatorics.Subset().cardinality method. Syntax : sympy.combinatorics.Subset().cardinality Return : Return the total cardinality of subset. Example #1 : In this example we can see that by using sympy.combinatorics.Subset().cardinality method, we are able to get the total cardinality of subset. Python3 1=1 # import sympy and subset from sympy.combinatorics.subsets import Subset # Using sympy.combinatorics.Subset().cardinality method gfg = Subset(['c', 'e'], ['a', 'b', 'c', 'e']) print(gfg.cardinality) Output : 16 Example #2 : Python3 1=1 # import sympy and subset from sympy.combinatorics.subsets import Subset # Using sympy.combinatorics.Subset().cardinality method gfg = Subset(['c', 'e', 'f'], ['a', 'f', 'c', 'e']) print(gfg.cardinality) Output : 16 Comment More infoAdvertise with us Next Article Python | sympy.combinatorics.Subset().cardinality method J jitender_1998 Follow Improve Article Tags : Python Practice Tags : python Similar Reads SymPy | Subset.cardinality() in Python Subset.cardinality() : cardinality() is a sympy Python library function that returns the number of all possible subsets. Syntax : sympy.combinatorics.subset.Subset.cardinality() Return : number of all possible subsets Code #1 : cardinality() Example Python3 1=1 # Python code explaining # SymPy.Subse 1 min read SymPy | Subset.next_binary() in Python Subset.next_binary() : next_binary() is a sympy Python library function that returns the next binary ordered subset. Syntax : sympy.combinatorics.subset.Subset.next_binary() Return : the next binary ordered subset Code #1 : next_binary() Example Python3 1=1 # Python code explaining # SymPy.Subset.ne 1 min read SymPy | Subset.iterate_binary() in Python Subset.iterate_binary() : iterate_binary() is a sympy Python library function that iterates over the binary subsets by k steps. Value of 'k' can be positive or negative. Syntax : sympy.combinatorics.subset.Subset.iterate_binary() Return : iterates over the binary subsets by k steps Code #1 : iterate 1 min read Python | SymPy Permutation.cardinality() method Permutation.cardinality() : cardinality() is a sympy Python library function that returns all the possible number of permutation. Syntax : sympy.combinatorics.permutations.Permutation.cardinality() Return : all the possible number of permutation Code #1 : cardinality() Example Python3 1=1 # Python c 1 min read SymPy | Subset.prev_lexicographic() in Python Subset.prev_lexicographic() : prev_lexicographic() is a sympy Python library function that returns the previous lexicographically ordered subset. Syntax : sympy.combinatorics.subset.Subset.prev_lexicographic() Return : the previous Gray code ordered subset. Code #1 : prev_lexicographic() Example Pyt 1 min read Like