Python | sympy RGS method
With the help of
sympy.combinatorics.Partition().RGS method, we are able to get the index value of members of subarray in the way that it is passed in the
Partition() method by using
Return : Return tuple of index values.
In this example we can see that by using
sympy.combinatorics.Partition().RGSmethod, we can get the index values of members of subarray in one tuple.
(0, 0, 1, 1, 2, 2, 2)
Example #2 :
(0, 1, 2, 3, 0)
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. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course