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
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.subsets import Subset
a = Subset([ 'c' , 'd' ], [ 'geek' , 'for' , 'c' , 'd' ])
print ( "Subset a next_binary : " , a.next_binary().subset)
|
Output :
Subset a next_binary : [‘for’]
Code #2 : next_binary() Example
from sympy.combinatorics import Permutation, Cycle
from sympy.combinatorics.subsets import Subset
a = Subset([ 'c' , 'd' ], [ '23' , 'c' , 'd' ])
print ( "Subset a next_binary : " , a.next_binary().subset)
|
Output :
Subset a next_binary : [’23’]
Last Updated :
26 Aug, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...