With the help of sympy.nT() method, we can calculate the number of partitions that can have a given number of parts in SymPy.
Syntax: nT(items, k)
items – An integer, a list or a string upon which partitions is to be calculated.
k – An integer specifying the number of parts that the partition should contain.
Returns: Returns the number of partitions that have given number of parts.
Value of k = 2 and the items are = aaa Partitions : 1
Value of k = 3 and the items are = [1, 3, 2, 5, 4] Partitions : 25
- class method vs static method in Python
- Python | set() method
- Python | next() method
- Python | os.dup() method
- Python | os.write() method
- Python | PyTorch tan() method
- Python | os.read() method
- Python PIL | putdata() method
- Python PIL | getcolors() Method
- Python | os.statvfs() method
- Python | os.chmod method
- Python | os.fchdir() method
- Python | os.dup2() method
- Python | os.close() method
- Python | os.closerange() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.